4 ms·
I don't see the problem with this design decision. I'm not the biggest fan of static type checking (especially in a language like Javascript, where it isn't us
by jmull 4y ago
I don't see the problem with this design decision.
I'm not the biggest fan of static type checking (especially in a language like Javascript, where it isn't used for safety guarantees), but it has its uses.
The "as comments" part of it isn't about syntax. They really mean no runtime overhead/behavior. (I don't think they should have put it that way -- it's just going to cause confusion.)
Is there really any question that "no runtime overhead" needs to be an option? (I think any proposal that didn't include this would be DOA.)
It also seems clear to me it needs to be the default option, for multiple reasons (language changes should be backwards compatible as much as possible, it should be easy to adopt new language features incrementally, type usage is an application-level concern.
Note: there's nothing in this proposal that prevents run-time enforcement. Good design limits scope but keeps your options open.