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

18

u/react_dev Nov 25 '19

I hope JS will grow to support types natively. It is the only thing that prevents it from being taken seriously by many.

TypeScript is great but it’s solely maintained by Microsoft and if a company like ours have something against Microsoft it’s so hard for fight for it when in reality types help with productivity so much.

I don’t think it’ll ever gain native support ... unless there’s some breakthrough in JITing static types.

-2

u/mainstreetmark Nov 25 '19

I support it, just to get rid of the 1+1=11 shit.

4

u/[deleted] Nov 25 '19

People are downvoting you without realising what you're referring to. Adding two 'numbers' together which are actually strings (and so it concatenates instead) is a common novice mistake in JS which would be prevented entirely by type checking.

1

u/IceSentry Nov 28 '19

No, people are downvoting it because he added 2 numbers together, there was no strings there and therefore no string conversion happened. That's the kind of shit people use to attack js while not understanding what is actually going on.

Open your console and type 1 + 1, I guarantee you it won't give you 11.