Wake me up when Python will support tail call elimination and will get rid of GIL. For now this language is no better than PHP.
Wake me up when Python will support tail call elimination and will get rid of GIL. For now this language is no better than PHP.
For the GIL, there are alternative implementations of Python (Jython, IronPython, etc.)
import sys
sys.setrecursionlimit(x)
Kind of a "hackish" way to do things but you can do it if you need to.
For example, 1000 levels of recursion is more than enough to count all the nodes in a binary tree unless the tree is extremely poorly balanced or inordinately large.
http://neopythonic.blogspot.co.uk/2009/04/final-words-on-tai...
Is Guido's take on it.
Essentially, as I understand it, his take is that massive recursion is confusing, and 'unpythonic'. And with the whole 'explicit is better than implicit' thing, I guess there is a point.
Some times recursion is the best/most obvious solution, and then it is a bit annoying to not have TCO, but you can usually work around it.
It's too bad it's apparently not good for... whatever it is you do. It is pretty great for some things, and having spent more than a few years with both Python and PHP, I can say without reservation that there is absolutely no comparison in terms of language quality.
[0] http://paulgraham.com/avg.html
[1] http://c2.com/cgi/wiki?BlubParadox
[2] http://weblog.raganwald.com/2006/10/are-we-blub-programmers....
Writing some C will cure that disease, but the treatment has possible side effects, like carpal tunnel syndrome.
It seems you have read some generic criticism of Python to copy from, and don't have much first-hand experience