Hacker News new | ask | show | jobs
by criticalfault 648 days ago
> JavaScript is the world’s most popular programming language

Is this really so?

I have the feeling this is 'popular' because there are no alternatives. Web is popular, this is just an accompanying disaster.

There was an argument about fragmentation so people didn't want more things as option. As an answer to that there were many (?) attempts to solve problems that come with JavaScript for years, anybody remember coffee script? The only one that worked is typescript. And typescript again transpiles to Javascript having worse performance and a bunch of limitations.

The only alternative that I saw that makes sense is dart and people crucified google for considering to include it in chromium. It is really a shame that this didn't get accepted.

4 comments

> Is this really so? […] I have the feeling this is 'popular' because there are no alternatives

I think it's pretty clear that JavaScript is the most popular one. And yes, it's popular because in it's space it's without alternatives. But so was C for many environments. We can judge if that's fair or unfair, but it does not change the situation we have.

Maybe it's about the definition of the word 'popular'.

Dictionary.com:

1. regarded with favor, approval, or affection by people in general

2. regarded with favor, approval, or affection by an acquaintance or acquaintances:

3. of, relating to, or representing the people, especially the common people:

4. of the people as a whole, especially of all citizens of a nation or state qualified to participate in an election:

5. prevailing among the people generally:

6. suited to or intended for the general masses of people:

7. adapted to the ordinary intelligence or taste:

8. suited to the means of ordinary people; not expensive:

I have always associated popular with definition 1. Let me ask differently: do people really like JavaScript or they like web and JavaScript is forced upon them since there are no alternatives (and they actually dislike/hate it)?

Well, there are alternatives. Many people user TypeScript (which then is compiled to JavaScript) or some other alternative. JavaScript is just a compiler artifact format.
With TeaVM you can compile Java to JavaScript and run it in the browser again. We've come full circle. https://teavm.org/
In the GitHub [1] and TIOBE [2] language stats, Javascript is NOT the most popular language.

[1] https://madnight.github.io/githut/#/pull_requests/2024/1

[2] https://www.tiobe.com/tiobe-index/

> The only alternative that I saw that makes sense is dart

I do not think Dart was much of an improvement

When the tooling improves WASM is

^ This.

Popular, but terrible.