I cannot understand the idea of using JavaScript that compiles into "native code".
At what point do JavaScript developers need to realise that this is all convoluted, and begin to use languages better suited for the job.
You want something that can compile into a binary with multiple architectures, multithreading, types, etc? Please use a different language that's built from the ground up to achieve that.
You want something that was designed to add some sugar onto a website? Then yes JavaScript is probably best there.
Not everything needs to be written in this one language that's not designed for it. Just because you can, doesn't mean you should.
Actually TypeScript is an excellent language (in my view) for targeting native code. It reads cleaner than Java, C# and even golang in many cases - at least to me.
For example, JS/TS's file-path based imports are more intuitive; several languages do it via explicit namespaces when well-written code is already organized into directories. Of course, all of these design choices are subjective. In fact, disagreement with a few people in the C# user community is one of the reasons I started this project.
Another example - top level functions, being able to export them trivially etc.
> At what point do JavaScript developers need to realise that this is all convoluted, and begin to use languages better suited for the job.
The comment was especially about TypeScript. Unlike the ancient JavaScript versions best used for web sugar you're possibly thinking of, it's a highly pragmatic and well designed general purpose programming language with an unique and very powerful type system.
At what point do JavaScript developers need to realise that this is all convoluted, and begin to use languages better suited for the job.
You want something that can compile into a binary with multiple architectures, multithreading, types, etc? Please use a different language that's built from the ground up to achieve that.
You want something that was designed to add some sugar onto a website? Then yes JavaScript is probably best there.
Not everything needs to be written in this one language that's not designed for it. Just because you can, doesn't mean you should.