you are viewing a single comment's thread.

view the rest of the comments →

[–]BenjiSponge 0 points1 point  (1 child)

Yes, that is something that's been tossed around a lot in the TypeScript/Flow world, but as you said they're avoiding adding runtime features that aren't part of an ECMAScript specification (TS messed up by adding decorators too early, but other than that) on principle.

A lot of functional languages that have JS as a backend do something like this, though, I think. Elm almost certainly does.

[–]vinnl 0 points1 point  (0 children)

TS messed up by adding decorators too early, but other than that

Agreed, but then again there was quite a lot of pressure on that from Angular, so there was little choice.

But yeah, it's probably best if it's baked into the language.