Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

> What, exactly, is it about JavaScript that makes it particularly appropriate for this paradigm?

V8.

And it's a pretty powerful language. C-like syntax (familiar), Lisp-like (powerful/flexible), it's everywhere and it's fast (thanks to V8). Really, if it weren't for Chrome, Node.js wouldn't be a thing, and JavaScript wouldn't be ruling the world.



Right, but V8 doesn't make the language itself particularly appropriate. (And calling it "lisp-like" is way over-reaching. It has first class, anonymous functions and closures, and that's it.)

To me, the node story seems to boil down to "V8 was a readily-available fast runtime and people who already knew JS flocked to it" — which is fair enough, but hardly an argument for how appropriate JS is, as a language, for this sort of programming model.


"V8 was a readily-available fast runtime and people who already knew JS flocked to it"

That's basically all there is to a language's success. We like to debate syntax and closures and continuations and type systems and immutability and concurrency models on programming language message boards, but realistically, nobody cares. The two questions they have when they encounter a new language are "Can I learn this in a weekend?" and "Can I build cool things that other people would actually want to use?"

If you look at the history of programming technologies that have "won", the list includes C++, Java, Javascript, PHP, C, Objective-C, and to some extent Perl, Python and Ruby. The first 4 of those are terrible from a language-design standpoint, but the two things they all had in common were a readily-available reasonably-fast runtime (except PHP, and that was "fast enough" for the things people use it for), and a familiar syntax. C, PHP, Javascript, and Objective-C also had the benefit of being the "native" language for a major application platform, which seems to be the other major critical success factor for a new language.


There's still a defense of languages here, and I'm not sure it's due. You chalk up the efficacy of V8 as a delivery mechanism to it carrying portable knowledge in (already knowing JS) and it's usefulness as a general tool.

There is a possibility that this viewpoint doesn't leave any room for: the possibility that languages make nearly no difference. Perhaps people are savvy, and interested in more complex things, but the various languages and platforms don't bring any concrete value. Instead of being a function of how widely-ranging people's interests are, it's instead a question of whether anyone is actually making real tracks away from a center, a center whose nebulous nature is only permitting the forging of false distinctions in.

Rather than marking time by languages, perhaps it's more interesting to mark what we focused our language use on?


Don't forget Basic! Lot of people learned to program with it, and did cool things with it, in the times of 8-bit computers. And it is still used, from DarkBasic and similars, to MS' variations on VisualBasic (VBA and such).

You can make smart, high level languages like Haskel or Ceylon, but people will generally prefer dumb, easy to learn languages like Basic, PHP or JavaScript, despites their limitations.

Result: instead of making a nice car, well designed and looking good, they put big wheels and powerful engine on soap box cars! :-)


When it comes to performance LuaJIT beats V8 hands down. Its really down to the "its everywhere", IMO.

And I'm not a big fan of that theory that JS is Lisp-like. The only thing thats particularly lispy about JS is the first class function and even then they are a bit fucked up because of the wonky function-local scoping rules and the "this" keyword.


* function-local scoping rules and the "this" keyword.*

It's showing that you've been burned by these magical creatures. It takes time and effort to get used to mastering these awkward concepts


Not really. He's just using that to note that JS is not really a Lispy language because of this. My choice for "why JS != Lisp" is how the Array functions return whatever you passed to them and not the array itself, so you can't write single-expression multi-modifications to an array. Unless you use the hellish Array.splice method. Which I'd argue is even worse.


"It takes time and effort to master" - Yes, but as we know this is accidental rather than essential.


How's this accidental and not essential?

Actually, if you don't know how ((this)) works in different context, you can't call yourself a good js developer.


I think JavaScript and the associated performance war was already well underway before Chrome even existed.


Yes, JITs in WebKit and Gecko showed up around the same time as v8, or a little earlier even. And the WebKit JIT (Nitro) beat v8 on various benchmarks.

It's still possible v8 somehow sparked those other JITs, if before it was public the developers of WebKit and Gecko learned of v8 and stepped up their game. But, I don't know if that's true or not.

Anyhow, it's an impressive achievement that people still mention v8 as the reason JavaScript is fast, when it isn't the fastest today, and wasn't the first to be fast historically. Although, it is certainly a worthy VM, just one among several.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: