3 ms·
I think some version of Typescript type hints or similar will eventually get adopted as a standard for JS. TS and similar are kind of like a testing ground and
by dgb23 5y ago
I think some version of Typescript type hints or similar will eventually get adopted as a standard for JS. TS and similar are kind of like a testing ground and will eventually be obsolete if it remains that prevalent and useful.
- eyelidlessness 5y agoI’ve pored over TC-39 proposals and it seems the general sway of proposals that are moving forward or successful are: - ergonomics (convenience methods/parity across collection types) - improve safety for broader use cases (realms etc) - embrace FP (records and tuples) - being a good faith language target for typed extensions Even very narrow type system stuff seems to stall and feels like it’s going to wither in stage 1 or get bikeshedded to death. Proposals which directly overlap with static typing explicitly eschew any of that overlap to be able to proceed. Part of me wishes Flow had won, even though I’m all in on TypeScript, because at least Flow had an optional story that could be built into the language and allowed to thrive on its merits and adoption. I can’t see a future where TypeScript or some variant gets folded into the language, because despite being gradual it’s explicitly a separate syntax with a build step. And I know the TS team is very engaged with TC-39, but the language syntax is very much in flux, and a Python-style “type hints ignored at runtime by default” is basically a deadlock or at least reasonably threatens to be one.
- dgb23 5y agoIm just imagining the benefits of runtime recognized type information for browsers/node. This plus proper immutable data structures would be a dream. Well we have WASM at least.
- eyelidlessness 5y agoYeah I see the benefits too. At least we’re going to get immutable data structures.