Hacker News new | ask | show | jobs
by FlemishBeeCycle 5665 days ago
> I choose JS because it is the only language that runs in the browser as well as the server (<--- Killer feature)

That's what I was getting at - that JavaScript is popular because of the position that it is in (not because of the ECMAScript specification). JavaScript could have been a number of languages, the fact that it happened to be JavaScript, is more a result of a externalities than the language itself.

JavaScript was originally developed on an incredibly short development cycle, so I would be very surprised if we couldn't create a better language for the browser after 15 years of experience.

As far as JS on the server - I don't really see the advantage (other than it's a language that people already know). Having written several Node apps, using a single language didn't strike me as a "killer feature" (especially since their usage is fairly distinct - manipulating the DOM vs manipulating data stores and what have you). Different tools for different problems. I don't see JS as being superior for solving server-side problems.

1 comments

"JavaScript could have been a number of languages, the fact that it happened to be JavaScript, is more a result of a externalities than the language itself."

If you are looking for The Perfect Programming Language, you are going to be waiting for a looooong time. They all have flaws. For everyone who loves a specific language, there's someone else out there that loathes it.

"I would be very surprised if we couldn't create a better language for the browser after 15 years of experience."

We probably could, but why? JS is very simple for beginners, expressive enough for experts, and extensible for everyone in between. Don't like JS? Fine, use any other language that compiles to it. Don't like any of those? Write you own, it's really easy.

"I don't see JS as being superior for solving server-side problems"

In the server-side scripting language world, JS & Node is by far the easiest way to do concurrent servers. That's at least one area is is superior at. There are also more JS coders than any other language on the planet, so that frees up a lot of people who are currently duplicating work by writing the same functionality for a dozen different languages.

You seem to be missing my point - which is not to criticize JS (I use JS frequently, and actually like a lot of it) - I'm merely suggesting that its success is not due to the language itself and its merits, but to the domain that it has found popularity in, the browser. Were there a competing language to JS (not Flash, not Java - but a comparable language for scripting the DOM), we might have a real comparison. How can you really gauge 'popularity' when there is no real choice?