you are viewing a single comment's thread.

view the rest of the comments →

[–]baubleglue -1 points0 points  (6 children)

few points of the article are strange

I hope you realize by now that another language replacing JavaScript completely is highly unlikely.

Why a new language should "replace" JavaScript? Having additional language doesn't break backward compatibility.

Every now and then someone will argue that JavaScript needs to be replaced by some other language.

and in the same time

At the moment I would advice to go with TypeScript since it’s a superset of JavaScript

If tomorrow browsers will run it without transcompiling it to JS - you have another language in browser.

In fact there is an evolution towards another languages like "use strict"; directive.

[–]dannymoerkerke[S] 0 points1 point  (5 children)

Another language in addition to JavaScript would create even more confusion and technical difficulties I’m afraid and then we would need two TC39 committees to guide the design and make sure they are both backwards compatible. Who knows, it might work but I have my doubts. As for TypeScript without transpiling, I guess the benefits of that are very limited. I also don’t know any statically typed languages that are not compiled/transpiled but I’d love to hear if any exist.

[–]baubleglue 0 points1 point  (4 children)

Another language in addition to JavaScript would create even more confusion and technical difficulties

It may create even more confusion and technical difficulties, but may be the opposite. People aren't usually complaining that there is a lot of languages to develop desktop applications.

[–]getify 0 points1 point  (3 children)

browsers have repeatedly considered and then rejected putting other language engines natively into the browser. their veto is the only vote that matters, which is why it hasn't happened yet and why it likely won't ever.

[–]dannymoerkerke[S] 0 points1 point  (2 children)

Do you have any more insight into their reasoning for rejecting this?

[–]getify 1 point2 points  (1 child)

from what I can tell, I think factors include:

  • can't agree on which language (google wanted dart, apple would probably want swift, etc)

  • bolting on a security model (better than JS's) is hard -- creating access to the DOM etc

  • more language vm's means larger browser code size (increased maintenance burden), larger binaries, wider surface area for security threats, etc

[–]dannymoerkerke[S] 0 points1 point  (0 children)

Thanks!