3 ms·
When JavaScript becomes a more stable general purpose language, Python will have to make a run for its cash. We have seen node.js and jslibs exists, as well as
by chuppo 14y ago
When JavaScript becomes a more stable general purpose language, Python will have to make a run for its cash.
We have seen node.js and jslibs exists, as well as OpenGL bindings for v8. Microsoft has bade WinRT where JavaScript is a first-class citizen for desktop programs. What can python offer then? Numpy and scipy and twisted? Those are just libraries, and bindings can be made from JS to their respective hot-spots of C.
JavaScript is already beating Python in speed.
- berntb 14y agoIs this why the "Perl is dead" trolling is disappearing? The Python people are busy with other things... :-)
- manaskarekar 14y agoI think, and I like to dream, that the next wave of stable general purpose languages will be functional. Given how distributed/concurrent/multi-x everything is, and will keep increasing in importance, it seems that functional languages will become more relevant. That said, as more and more domain specific languages come to be, and general purpose languages mature, there's probably not going to be a 'single winner.'
- eric_bullington 14y agoNot sure if you'd consider it a general purpose language, but you can certainly use JavaScript in a functional style. It's not a "pure" functional language, but among commonly-cited languages, what is a pure functional language besides Haskell? If I'm not mistaken, proper tail calls are even slated for addition to the next version of the ECMAScript standard.
- JackC 14y agoOut of my depth here, but I think functional languages are relevant to distributed/concurrent programming because they tend to provide (and enforce) explicit ways to avoid or manage side effects and mutability. They're likely to be very different at an interpreter/compiler level from a language that happens to allow you to avoid side effects and mutability, but isn't designed to know when you're doing that or to optimize for it. (I'm thinking, for example, of the insane way Clojure implements dictionaries under the hood in order to efficiently copy them rather than edit them in place, which in turn enables its approach to efficiently rolling back and retrying operations that contend for the same shared transactional memory.) The upshot is that an imperative language like JavaScript will let you borrow some nice techniques from the functional world, but won't have a lot of the benefits of a language that's designed to only be used that way. Again, no idea what I'm talking about, that's just the impression I have from the little I've learned about functional programming so far.
- timClicks 14y agoIf you read Doug Crockford's talks, he refers to JavaScript as a Scheme with braces. Erlang is common enough as a language on a server to warrant a mention. It is not purely functional, but comes close. Immutability (no shared memory) and message passing are the key points.
- pwang 14y ago> What can python offer then? Numpy and scipy and twisted? Those are just libraries, and bindings can be made from JS to their respective hot-spots of C. This is true but it's missing the point. Scientific programmers and data analysts use Python because syntax matters. Getting those people to program their ideas in Javascript will require syntax changes, and it's not merely an issue of libraries.