> Take this idea that JavaScript is a "badly designed language" out of your head
Respectfully, no. The impressive thing about it is it was written in 3 weeks. Edit: I also didn't say Javascript was a badly designed language, at least not in the post you replied to.
The rest of it is like PHP (yes, I have programmed a fair bit in that as well).
> and understand that about 99% of JavaScript's behaviours are intentional.
So much worse ;-) There is one good defense for Javascript IMO and that is it was made in a very short time.
Intentionally leaving in a heap of footguns like Javascripts type coercion isn't brilliant, it is either pragmatic, myopic or evil. I say pragmatic in this case.
> The majority of gotchas in JS are shown by people who don't understand type coercion, prototypes or who expect it to behave like x language.
The classic Perl defense I'd say: ~you don’t understand the beauty of it.
> TypeScript is miserable. I see people building libraries in TypeScript and it's sad because they will never know how much better their performance could be or how small their lib size could be because the can only think in OOP.
Well, every thing you can do in JS you can also do in TS.
In a sense you can say this is our implementation of what you said above: "If you are somebody who is intuitive enough to create your own restrictions on what to use and what not to use in JS from the POV of the language's architecture then you will love it." And here you are right: Typescript is quite a lovely language:-)
Also: By this logic we should be programming in assembly.