by anonjon · 17y ago · 0 comments
And to me it seems that learning a new programming language (even one using a relatively obscure syntax), is a much simpler task than designing an entire project (or piece of a project), around a language that doesn’t really fit the needs of a project.
To that extent, I think that the idea of a ‘lingua franca’ language is an inherently broken metaphor. Programming languages are closer to human-computer interaction tools than they are natural languages. ‘Lingua franca’ implies that every language can communicate approximately the same thing (it is just a matter of who has influence). I think this is a mistake, as different languages allow you to think in hugely different ways about programming. Different languages have different intrinsic concepts.
It may be that this argument boils down to ‘if all you have is a hammer, everything looks like a nail,’ but even that is an oversimplification, as I don’t even use the same hammer for all types of nails (tack hammer, framing hammer, etc).
I am not saying that node.js is necessarily a bad thing to have. It may turn out that Javascript is indeed particularly well suited to this type of application. Superficially, however, nothing convinces me that this is some sort of exciting home-run-win situation (or that it is any better than any other functional-style programming language).
Could you explain the excitement and appeal to me?
I don't think JavaScript will cover every paradigm in the sense of obscure language concepts, in that it will likely never have Lisp's complicated macro system or Ruby's ability to make really fluid DSLs. I don't want it to; the appeal to me is that what's going on in JavaScript is almost always self-evident (if you avoid the bad parts). () means you're calling a function or forcing operator association. {} means you're defining a block, array, or dictionary.
I do think, though, that it could establish the new minimum standards of the 'demo language' for an algorithm. For algorithm demonstration and sharing, I think it's absolutely awesome that there is a language that is now capable of doing anything you want with an interpreter (albeit DOM-confined) pre-installed on every single computer you use. I don't want to read Wikipedia algorithms in some hacked-up Pascal. Give me something I can run now, but that's universally understood: a strong common medium to explain programming languages in unobfuscated terms.
There's not much I can say that I didn't already say in my blog entry. JavaScript is designed for event-driven programming in the browser, and my brief experience with node.js makes me believe that it also works well for event-driven programming on the server. And V8 is really fast.
As for Erlang... when you're programming for the web, it's useful to have a programming language that treats strings as more than just an array of integers.
http://www.erlang.org/cgi-bin/ezmlm-cgi?4:mss:47293:200911:d...
(You can either think that he is biased or that he would be an expert on it).
I mean, it seems to me that javascripts main advantage in programming for the web would be DOM manipulation. And that is good, but a lot of languages can do it. (Honestly I've never really done (much) direct string manipulation for web programming).
It doesn't seem to me that javascript really has a monopoly on event driven programming either. It is relatively easy to do that sort of thing in almost any other functional style language...
Could you explain the excitement and appeal to me?
Yup. Javascript combines several elements that give it a reach for high power.* Javascript is a prototype-based language. I find this to be a better way to write software than other approaches.
* There's a good ometa implementation for javascript. Ometa is a powerful ways of writing domain specific languages.
* Modern JVMs support javascript, meaning that anything you do in javascript can be adapter to leverage existing Java codebases.
* Combination of javascript on both the client and server will likely expose new possibilities. For example, I've been thinking about the possibility of a 'builder' app in javascript whereby you use a firebug console to dynamically build a form and attach business logic to it and then freeze it back to the server. Yes, you could do it at the moment, but it's less effort if you only have one codebase to think about. The thread of bloat in the client becomes less of a problem with new approaches to development like Google Gears, also.
Node.js is an important foundation to javascript establishing itself as a viable server-side language. At a glance, it looks to be a good balance of what's needed, also.
What popular languages are cooler than JS? Maybe Ruby, but for my taste there is too much metaprogramming in Ruby which makes it very hard to master. I like the extreme simpleness of JS (basically everything is a hash, that's it).
Though I must admit that now that it looks like it has a shot at being the language for everything, I am getting second thoughts. Those brackets can get ugly - something with a slightly cleaner syntax might have been preferable. But all current languages have their pros and cons, and JS doesn't fare badly in copmparison.
For example I think Ruby takes it too far - you can get clean syntax, but the tendency to create something like a DSL for everything is also a burden for learning. Plus, Ruby is still too slow for a lot of tasks.