DEV Community

Discussion on: Future Javascript: Types may finally be coming to Javascript

 
smpnjn profile image
Johnny Simpson

That's why it's annotated, and not enforced. Annotated types mean you can still write your Javascript with types, and it'll be valid Javascript, or you can write it without types, to get the flexibility you describe.

Thread Thread
 
jonrandy profile image
Jon Randy 🎖️ • Edited

So much yak shaving just to avoid adapting your mindset to using a language that doesn't have strict typing. I'll never understand it.

This proposal just feels like TS creators trying to dig themselves out of a hole that they created for themselves

Thread Thread
 
mateusmento profile image
Mateus Sarmento • Edited

Dude you seem a bit stoned reading from your comments. But I don't understand your unnecessary complain with a proposal for types in javascript. To be honest I agree with you to say that the type annotations would not be meaningful for the javascript language itself if "treated like comments", which actually is my complain here. Having type check in runtime would open the doors for something like multiple dispatch for functions which would be wonderful for implementing ad-hoc polymorphism and being able to simply overload functions... I really think you are either being unreasonable or just really stoned. This browser extension thing was hilarious...