3 ms·
You can write pretty functional python, though. There are python compilers like Nuitka (I'm sure there is an llvm frontend somewhere...), mobile is kind of a pi
by zanny 12y ago
You can write pretty functional python, though. There are python compilers like Nuitka (I'm sure there is an llvm frontend somewhere...), mobile is kind of a pickle, yeah, I'd say Django is pretty rails but I always use bottle because I've never needed the kitchen sink before, and the reason its not in the browser is not pythons fault.
On that topic, I'd spend a day writing cobol or C++98 if I could get QML + Python in browsers. Python as a script/python, and QML as a uri schema (ie, http://foobar.com/baconwitch.qml http://foobar.com/baconwitch.qml)
- allendoerfer 12y agoYou can use Ruby outside Rails, too, or Java outside of enterpricy applications. Last time i checked (few years ago) you could even use PHP for GTK desktop apps. You can write laggy mobile apps in pretty much every major language. My point is: Most successful languages have their point, why you use them. They are successful, because of their focus on not because they try to beat every other language imaginable. Python's use cases are already pretty diverse. So I have trouble to understand the constant fear Python could miss out on any platform or paradigm.
- thinkpad20 12y agoThe main problem with functional programming in python is the bizarre neutered version of its lambdas. It really limits the expressiveness of using anonymous functions in python, as compared to, say, JavaScript. It's by far my biggest complaint with what is otherwise one of my favorite languages.
- dorfsmay 12y agoSince you can define a function inside a function, why does it matter that it isn't anonymous?
- SoftwareMaven 12y agoHaving done a lot of python and JavaScript, all I can say is it does matter. It is an extra redirect as you try to find out what is happening as part of a callback (repeated over and over). It is also additional cognitive load as you now need to mentally parse the function's name (which you don't actually care about) and the function's purpose. Finally, it is more time consuming. I really like coding in python, but the weak-sauce lambdas are on of my least favorite things about it. I would like tail call optimization, but living without it doesn't bother me on a daily basis. Lame lambdas do bother me on a daily basis.
- dorfsmay 12y agoIs tail optimization a language or an implementation issue? Couldn't that be implemented in the compiler without changing the language?
- eevee 12y agoDon't try to fake anonymous functions in Python. Use its strengths: decorators, generators, etc. Anonymous functions work well (err, passably) in JavaScript and Perl. They don't really work in Python, and of course you'll just run into pain if you try to force them to. Perhaps also make some noise about this PEP: http://legacy.python.org/dev/peps/pep-0403/ http://legacy.python.org/dev/peps/pep-0403/