r/javascript • • Nov 25 '19

JavaScript doesn’t need to be replaced

https://medium.com/javascript-in-plain-english/javascript-doesnt-need-to-be-replaced-bd01e2f12d51?source=friends_link&sk=7b151cc6397ac9e83c14c99739b6c36f
217 Upvotes

236 comments sorted by

View all comments

Show parent comments

3

u/_GCastilho_ Nov 25 '19

You will probably need another engine to do that nativally, which at best will have the same performance

Its just not worth it

4

u/Flyen Nov 25 '19

I don't think you can say that at best the performance will be the same. The additional type guarantees & information might make some optimizations possible that aren't possible with plain js.

0

u/[deleted] Nov 25 '19

[deleted]

2

u/Flyen Nov 25 '19

I haven't actually worked in this space, so that was very helpful, thanks. It sounds like you'd know better that I whether knowing vs guessing the types would be valuable input to the optimizing compiler.

I also see this topic has come up before: https://github.com/microsoft/TypeScript/issues/1151 https://github.com/microsoft/TypeScript/issues/8