3 ms·
My impression is that Python is certainly not a better language than JavaScript. They both have their quirks, so it ends up being a matter of preference. For ex
by facepalm 12y ago
My impression is that Python is certainly not a better language than JavaScript. They both have their quirks, so it ends up being a matter of preference. For example Python doesn't have real lambdas, on the other hand it has named parameters.
The only reason to use Python that I can think of is maybe SciPy.
I made me sad to witness Python gaining so much in popularity as a beginner language in the last year.
- mkesper 12y agoThe idea that readability matters influences the whole Python ecosystem and community. Python3 also eliminated quite a handful of quirks (e.g. division, Unicode). By the way, it's not since last year only that Python was used for introduction but for years now.
- boomlinde 12y agoI'm curious about this sentiment about python lambdas. What about them is not real?
- facepalm 12y agoIt's been a while, but doesn't it have restrictions, like you can only use it for one liners? Edit: found this via Google - "lambda functions can not contain commands, and they can not contain more than one expression"
- boomlinde 12y ago> and they can not contain more than one expression I don't believe that is different from e.g. scheme. Ideally, a lambda expression would look like a normal function body, but I definitely wouldn't discount them as "not real" on this basis.
- facepalm 12y agoIirc in scheme you can put anything into a lambda that you want. Of course the Python lambda is "real", the correct word to use would have been "limited" I suppose.
- maxerickson 12y agoI suspect much of it is a conflation of the properties of anonymous functions with the properties of first class functions. People see first class functions implemented as lambdas and end up focusing on the wrong part of it (rather than fully understanding what is going on). I realize that more powerful anonymous functions can make for prettier code, but Python's single expression anonymous functions cover an awful lot of the situations where making a name would make the code substantially uglier.
- yawaramin 12y agoYou can 'fake' real lambdas in Python, exploiting the things that it does allow. My approach uses continuation-passing style: https://github.com/yawaramin/lambdak https://github.com/yawaramin/lambdak