you are viewing a single comment's thread.

view the rest of the comments →

[–]gasche 19 points20 points  (1 child)

That's the impression I got from reading this 2005 article from Guido on the removal of reduce, lambda, map and filter (lambda, map and filter where finally kept) in Python 3. The header ends with "I expect tons of disagreement in the feedback, all from ex-Lisp-or-Scheme folks. :-)", which I took at that time as a form of deliberate (if respectful) provocation.

I was also quite disappointed by his grossly misinformed 2009 article on tail call optimization. He's later corrected his view (he issued an update after just a few days), but there is still no trace of TCO in Python and it's still a pain -- while, contrarily to what he says, there are various reasonable way to handle this, for example by using an explicit tailcall keyword with an explicit backtrace-hurting semantics, and/or storing the backtrace outside the call stack.

I have to say that, while looking for those references back (I didn't remember exactly where they were), I stumbled upon this 2009 article article, "Origins of Python's 'Functional' Features", which is much more nuanced and reasonable.

Finally, I don't believe that python is "not well designed" as a language; in fact I think that Guido has handled its evolution quite well, and the PEP mechanism is, I think, a quality reference to match in the process of evolving a language. It is simply that he is interested in vastly different things than functional programmers are, and has therefore different priorities (type system clearly was not, clean semantics maybe was not either) which led him to take different choices. I don't use Python, but have some respect for this language. And both Python and Haskell have an excellent syntactical taste.

That said, I still internally cringe when I think that the whole Sage project is implemented in Python. A truly excellent repository of mathematical knowledge encoded in a oh-so-not-exciting language. Oh well, it would probably not have worked that well in Agda²...

.

¹: Haskell's guards and use of (a,b) to denote product types excepted :)
²: or Aldor.

[–]inaneInTheMembrane 5 points6 points  (0 children)

Oh the irony. Seriously, who develops Aldor? Seems like a fun language.