Look, given how the JavaScript ecosystem works (i.e. tendency to be heavy on external dependencies) it's not all sunshine and roses in the ReScript world because JavaScript Interop is a topic in and onto itself.
I still believe that TypeScript adoption has less to do with the sincere desire (or need) to adopt static typing but more with VS Code's TypeScript support and the associated developer experience.
TypeScript knowingly limited the "type safety" potential by basing its syntax on JavaScript (prioritizing JavaScript interoperability) but then promptly introduced its own non-compatible syntax requiring transpilation.
At this point one cannot get around TypeScript. However I think it's a good idea to get familiar with JSDoc TypeScript. That way one can choose to author in JavaScript, not having to transpile all the time but simply run TypeScript occasionally as a super-linter.
Rich Harris
@rich_harris
Moved some of my smaller libs to JSDoc TS; thoroughly recommend it. Among other things, the resulting code is generally smaller than transpiled code. Building, testing etc all become much less finicky. And .d.ts files are still generated from source code twitter.com/swyx/status/13…
Interesting counter-trend - maintainers of large open source projects like @Sveltejs and @Deno_land are moving *AWAY* from writing their internals in TypeScript
Just at the same time when the wider dev world is falling in love with TS.
Reasons: build times and code complexity. https://t.co/a74GAoYhwp
Personally I still view TypeScript as a missed opportunity. Given the cost of compilation (and having to learn additional syntax) there was a real opportunity to use modern static typing (e.g. Rust vs C/C++).
TypeScript began its life as an attempt to bring traditional object-oriented types to JavaScript so that the programmers at Microsoft could bring traditional object-oriented programs to the web.
Microsoft introduced F# in 2005 and TypeScript didn't appear until 7 years later in 2012 - but ultimately the C# way of working and thinking prevaled (given that JavaScript dates back to 1995 I don't see 17 years worth of improvement in TypeScript).
@Rich_Harris@antony@swyx@sveltejs@deno_land It surprises me this requires convincing. TS is fully authortime convenience and really only obfuscates at runtime which isn't beneficial. (Non standard syntax aesthetics aside.)
13:55 PM - 16 Jan 2021
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Look, given how the JavaScript ecosystem works (i.e. tendency to be heavy on external dependencies) it's not all sunshine and roses in the ReScript world because JavaScript Interop is a topic in and onto itself.
I still believe that TypeScript adoption has less to do with the sincere desire (or need) to adopt static typing but more with VS Code's TypeScript support and the associated developer experience.
TypeScript knowingly limited the "type safety" potential by basing its syntax on JavaScript (prioritizing JavaScript interoperability) but then promptly introduced its own non-compatible syntax requiring transpilation.
At this point one cannot get around TypeScript. However I think it's a good idea to get familiar with JSDoc TypeScript. That way one can choose to author in JavaScript, not having to transpile all the time but simply run TypeScript occasionally as a super-linter.
Personally I still view TypeScript as a missed opportunity. Given the cost of compilation (and having to learn additional syntax) there was a real opportunity to use modern static typing (e.g. Rust vs C/C++).
Quote
Microsoft introduced F# in 2005 and TypeScript didn't appear until 7 years later in 2012 - but ultimately the C# way of working and thinking prevaled (given that JavaScript dates back to 1995 I don't see 17 years worth of improvement in TypeScript).
See also Here is why you might NOT want to use TypeScript, The Trouble with TypeScript.