4 ms·
I agree with the python one. Some more things I find annoying in Python: - Hardcoded recursion limit + no tail call optimization. I understand Guido's reasons
by Vaskivo 13y ago
I agree with the python one.
Some more things I find annoying in Python:
- Hardcoded recursion limit + no tail call optimization. I understand Guido's reasons for this but I find myself writing ugly code instead of beatiful code. (But maybe changing this would make Python's internals ugly.)
Mainly Python but other languages too.
- Length of the collection: len(foo). String representation: str(foo). Why not foo.len() or foo.str().
Or even better: foo.len or foo.str.
As a Python user, I'm not a fan of getters. I think we should use the "attribute syntax" to get data about and of the object/type/thing, regardless if it involves any computations or not.
(but would probably generate more problems than solve little nitpicks)
- chas 13y agoThis doesn't help in quite the way you would like, but the recursion limit is adjustable through sys.setrecursionlimit [1]. [1]http://docs.python.org/2/library/sys.html#sys.setrecursionlimit http://docs.python.org/2/library/sys.html#sys.setrecursionli...
- Vaskivo 13y agoThe problem is not that there is a hardcoded limit. Python just isn't suited for heavy recursion. As for tail-call optimization, here's Guido's opinion (which I agree): http://neopythonic.blogspot.pt/2009/04/tail-recursion-elimination.html http://neopythonic.blogspot.pt/2009/04/tail-recursion-elimin...