Posted Mar 28, 2013 23:26 UTC (Thu) by man_ls (subscriber, #15091)
Parent article: PyCon: Evangelizing Python
It is funny that the speaker compared Python with Ruby so often, but apparently never mentioned JavaScript. I have the feeling that JavaScript is (oh surprise) the shiny cool new kid, despised for many years as a client-side adornment but lately stealing the wind from all the rest. And excuse me for mixing my metaphors so badly.
That has happened to me: I have to confess I am infected too. I have used Python for several years and it has served me well. But something about it was a bit bland: at its core it did not seem to trust functional programming but had to disguise it with comprehensions and yields. It was finally the transition from 2.x to 3.x did me in: really shoddy engineering; and that is not even the point.
Now I have seen really intelligent people moving JavaScript forward, doing very interesting stuff on the client and creating one of the most incredible ecosystems in Free software with npm. Few people are missing anything in Python out there, and it is really astonishing to me as Python is quite elegant and JavaScript tends to be horrible. And yet JavaScript works better and seems to be better suited for anything in real life.
Posted Mar 29, 2013 8:27 UTC (Fri) by marcH (subscriber, #57642)
[Link]
> But something about it was a bit bland: at its core it did not seem to trust functional programming but had to disguise it with comprehensions and yields.
Functional programming in Python is a bit of a mystery. On the one hand it is seriously good at it and on the other hand the BDFL is not a big fan:
Actually... by not scaring users away with functional syntax, Python might have done more for functional programming than functional languages, introducing many more people to it. Maybe that was Guido's secret or subconscious plan?
Oh and by the way: object oriented stuff is totally optional in Python and can be completely forgotten when not appropriate. A massive relief for anyone coming from... here for instance: http://steve-yegge.blogspot.com/2006/03/execution-in-king...
> It was finally the transition from 2.x to 3.x did me in: really shoddy engineering;
Care to elaborate a bit?
Python vs JavaScript
Posted Mar 29, 2013 11:07 UTC (Fri) by man_ls (subscriber, #15091)
[Link]
Care to elaborate a bit?
Sure, it is just the incompatibility between Python 2.x and 3.x code: it forces library developers to choose to support one or the other, instead of offering a common ground (which developers have found on their own but is still a bit cumbersome). To this day the default packages carried by Debian and Mac OS X (the two operating systems I use) are 2.x, so there is little incentive to upgrade most libraries.
I have spoken a lot about it in the past and received a lot of interesting feedback, so allow me to say just that a different solution would have been much appreciated and might have eased the divide, should such a divide be absolutely necessary (something that I am not sure).
On to the subject of the non-rivality with JavaScript: the PyPI has currently 29444 vs 26256 for npm; in a couple of years node.js is almost at the same number of packages, and that is without counting the huge number of browser-specific libraries. npm is still accelerating. It is hard to find comparable statistics of total downloads and such, but the most popular PyPI package is lxml which has seen about 8M downloads, while the most starred npm package (right on the front page), the web server framework express, has seen 1/17th as many downloads in the last month alone.
It is interesting how Python developers don't seem to see JavaScript as the competition and instead focus on Ruby. For me they cover a very similar space: both are scripting languages that have overstepped their boundaries, both multi-paradigm (although in the case of JavaScript "paradigm" is a bit charitable) and both contenders for the successor of Perl as "the duct tape of the internet".
Python vs JavaScript
Posted Apr 4, 2013 7:04 UTC (Thu) by sayap (guest, #71380)
[Link]
> To this day the default packages carried by Debian and Mac OS X (the two operating systems I use) are 2.x, so there is little incentive to upgrade most libraries.
Debian Python maintainer is not very good at his job: http://lwn.net/Articles/496335/ Be grateful that you even have Python 2.7. Also, a quick Google search shows that MacPorts has packages for Python3.
> On to the subject of the non-rivality with JavaScript: the PyPI has currently 29444 vs 26256 for npm
You are comparing a "batteries included" language with one that doesn't have a standard library.
Python vs JavaScript
Posted Apr 4, 2013 7:52 UTC (Thu) by man_ls (subscriber, #15091)
[Link]
You are comparing a "batteries included" language with one that doesn't have a standard library.
True for JavaScript, but node.js does a good job of supporting a fair standard library.
Python vs JavaScript
Posted Apr 4, 2013 20:42 UTC (Thu) by joib (guest, #8541)
[Link]
I've been toying with the idea of playing around with node.js when I get some time. But I wonder, how well does it do for "normal" scripting stuff? I'm sure it's a nice tool for building socket servers, proxies and so on, but how suitable is it for stuff outside that niche? Stuff like parsing text, csv files, connecting to databases (ldap, sql, ...), access to POSIX functions, etc.?
In addition to the above, personally in python land I've used numpy/scipy/matplotlib extensively to do calculations and plotting stuff; AFAICT javascript/node/npm doesn't have anything coming close to those. But in the grand scheme of things that's perhaps a somewhat esoteric use case. Then again, servers capable of handling tens of thousands of concurrent connections seem pretty esoteric as well (to me, at least!)..