|
I know that since 'the good parts' it's almost become the ironic t-shirt of the programming world, but I really love JavaScript, here's some of my reasoning: 1. By now everyone knows of JavaScript's functional features, which I must admit are awesome, but many other languages share these. But what few languages share regarding these is they're a very common part of standard js programming. A lot of new python and even ruby programmers have never touched the functional features of the language, but even a copy & paste js 'programmer' has probably written a lambda function, used a first class function, and maybe even used a closure. 2. It's fundamentally different than most other other languages. I love Haskell and it's awesome type system, but I also love JavaScript and it's true rejection of a type system, even throwing out classed based inheritance for prototypical. It's also a world where events and asynchronous computing are completely commonplace. What's interesting about this is that it is related to number 1, in other words it is an extremely practical application of principles of functional programming. Having written my share of parallel C code, writing concurrent/parallel code is much more of a pain without basic features of a functional language. On top of this being able to easily implement things like currying is actually pretty amazing. At the same time the language is very, very simple at it's core. 3. The above 2 reasons are things I would expect from a less popular and therefore harder to distribute language. Common Lisp is definitely more interesting of a language than JavaScript, but if I want to share something I've done in Common Lisp with someone, they better also be a fan of the language. On the other hand if I make something really cool in JS I can easy share it with anyone, even people who think IE is the 'internet'. Also I'm pretty sure that more people of varying skill levels can read JavaScript than any other language. So if I want to demonstrate something, for a very general audience JavaScript is much better than C, and for demonstrating functional programming techniques it's worlds better than Lisp or ML. |