4 ms·
Im curious what a proposal like this means for other compile-to-js languages. I'm assuming it really won't make any difference to those, but languages like ReS
by l30n4da5 5y ago
Im curious what a proposal like this means for other compile-to-js languages. I'm assuming it really won't make any difference to those, but languages like ReScript, PureScript, or Elm, for example, all are statically typed and compile to js in the end.
- jakelazaroff 5y agoI don’t think it means anything, since the JS parser will just ignore the type annotations.
- l30n4da5 5y agothat was my thought, as well. curious to see, though, if popularity of other statically-typed compile-to-js languages will suffer if TypeScript syntax is adopted into the js spec (presumably causing TypeScript to gobble up more market-share).
- phil294 5y agoCoffeeScript, for one, is already at least talking about emitting TS [1]. These kinds of changes are vigorously debated though, e.g. [2]. Once ECMA type comments get to stage 4, CS would probably also adapt the new syntax. Other compile-to-js languages that already ship with their own type system like Dart will probably be indifferent to the debated proposal. [1] https://github.com/jashkenas/coffeescript/issues/5307 https://github.com/jashkenas/coffeescript/issues/5307 [2] https://github.com/jashkenas/coffeescript/issues/5394 https://github.com/jashkenas/coffeescript/issues/5394
- madeofpalk 5y ago> What about compatibility with ReasonML, PureScript, and other statically typed languages that compile to JavaScript? > While these languages compile to JavaScript, and have static typing, they are not supersets of JavaScript, and thus are not relevant to this proposal. https://github.com/giltayar/proposal-types-as-comments/#what-about-compatibility-with-reasonml-purescript-and-other-statically-typed-languages-that-compile-to-javascript https://github.com/giltayar/proposal-types-as-comments/#what...