Remix.run Logo
rvz 7 hours ago

> TypeScript is a wonderfully advanced language though it has an unfortunately steep learning curve; in many ways it’s the complete opposite of Go.

Replace "TypeScript" with "C++" and the same can be said.

It is one of the worst languages ever designed and already built on top of a sloppy foundation (Javascript) compared to Go.

The language encourages escape hatches and tons of flexibility on how it checks its types and creates the risk of inconsistency to engineers on which rules to adopt and there is always one engineer that will disagree with some settings and argue to turn on/off a rule to defeat the purpose of the language.

At this stage, its no better than C++ but significantly slower, and I've seen the same mistakes (enums, allowing "as XYZ" casting, etc) in C++ creeping into TypeScript.

Even the entire language parser and type checker is being rewritten in Go. [0]

[0] https://devblogs.microsoft.com/typescript/typescript-native-...

another_twist 3 hours ago | parent | next [-]

I disagree. The speed with which Typescript replaced JS as the default is testament to its strength. I remember back is the good old JS only days you had to assume that all the form values we passed and read were strings and not an integer account number for example. Typescript solves these challenges and that alone eliminates a large class of frankly nonsensical bugs.

The reason it is being rewritten in Go is so the compiler can be run at native speeds which is a good thing. Otherwise the only runtime we have available is NodeJS which has its fair share of problems. You can go far with TS with just interface definitions and some generics peppered in for common utilities. The places where all the type gymnastics is necessary are cases I frankly havent encountered in the usual course of development.

knallfrosch 3 hours ago | parent | prev [-]

Tell me when Go is browser ready

another_twist 3 hours ago | parent | next [-]

Misses the point. Both these languages have their place. Besides there's no benchmarks beyond developers personal opinions that tells us whether a language is browser ready or not.

fragmede 3 hours ago | parent | prev [-]

When.

    export GOOS=js
    export GOARCH=wasm