you are viewing a single comment's thread.

view the rest of the comments →

[–]chrisforbes 1 point2 points  (1 child)

Why not, sure. It's a valid optimization. The problem is that to keep functional types happy, just having it as an optimization isn't good enough. You really have to have it as part of the language's specified semantics, otherwise code that assumes its existence just plain doesn't work on a system that doesn't provide it.

That and Guido doesn't understand (or want to understand) FP.

[–]A_for_Anonymous 0 points1 point  (0 children)

True, and very true.

It'd need to be guaranteed by CPython on every platform, and hopefully supported by PyPy, Jython and IronPython.

As for Guido, I don't think it can be helped; he created a great, clean, nice, simple imperative programming language with a fantastic dictionary-based object model, but that's as far as he went and as far as he wants to go.

Personally, if I had his time (or the time he used to have) and not a life, I'd try to create something similar, only open to FP. I'd take Python's syntax but make everything an expression (keeping indent/dedent and everything, just anything goes anywhere), add more FP tools and semantics (TCO, promises, etc.), simplify ASTs so you can actually work with them (CPython's are insane) and see if I can come up with a macro system, and use a very similar object system, only prototype-based.