'use typed'; directive

Are there any plans to create a typed version of the language? For example, something like 'use strict'; but 'use typed'; and a typing such as Typescript or C is incorporated. I think it could be useful in larger projects.

I think that with the numbers it would be necessary to create some syntactic sugar, as with the classes.
I know, the proposal is a bit vague, but I found the directive interesting because it allows developers to choose whether they want, to type or not.

1 Like

Not TC39, but been observing their discussions and such for a while.

Just wanted to give you a heads up that new pragmas like that have virtually zero chance of succeeding unless they offer something seriously compelling like defining native functions and such (where transpilation and polyfills aren't possible). Criticisms range from feeling too much like versioning the web (a really hard lesson learned pre-ES6) to feeling too Perl-y with all their use declarations.

So far, the only proposals I've seen using pragmas (and sticking with them) are just these two:

1 Like
Thank you very much @isiahmeadows for responding. The key to my proposal is that it is optional, so everyone can choose what they like best. I don't know why there wasn't more interest here on this topic.
Maybe it escapes this proposal, but given the adoption of typescript in frameworks, many developers feel more comfortable using typing, I don't know if this is sufficient justification.
I think if typing is incorporated, JS might be a better fit as a scripting language for application addons.
When and who should discuss how to implement it, I don't know but I think it's a step that JS should take. It would feel like a mature language and it would be very didactic too. For my JS it should be like a just-in-time compiled C++.