Live data from Hacker News

Ten Years of TypeScript

devblogs.microsoft.com

81–90 of 147 posts

Re: Ten Years of TypeScript

#81

Earlier quoted context omitted.

Typescript by itself is just the language. You could try a different typescript compiler like esbuild for example.

> However, esbuild does not do any type checking so you will still need to run tsc -noEmit in parallel with esbuild to check types.

Personally, I find that I don't really need full type checking on every build. For most small changes, the errors shown in vscode are sufficient while editing, and then full type checking can be run occasionally when needed (and in CI of course).

Re: Ten Years of TypeScript

#82
post #72

Typescript as a language isn't too bad but the ecosystem is an absolute dumpster fire. NPM is terribly fragmented, costs a fortune in effort to maintain dependencies, security updates etc... Every Typescript/JS project I work on is full of a dangerous amount of third party dependencies - it can be hundreds if not thousands in a single repo - many of them fragile in their own special way. Language packages management…

That’s not a Typescript problem, that’s a modern JavaScript stack problem.

let Typescript have it’s win here… I want to hate it because I loath Microsoft so deeply, but it really has changed everything in the web world, I wouldn’t hire a front-end dev who couldn’t work in it now.

Re: Ten Years of TypeScript

#83
post #58

I've spent the last two years working with TypeScript solely. Coming from ~20 years with PHP and using Kotlin and Dart for some years as well, I feel that I'm doing something wrong. I absolutely loathe working with TypeScript. The community is the most fragmented I've ever experienced, the silly amount of package managers, builders... TypeScript just doesn't fit with me.

That is the same as saying you hate Kotlin because Android annoys you. Or blaming JavaScript for the browser DOM.

Please correctly blame the ecosystem that you dislike, instead of thoughtlessly using a language as a label for an ecosystem.

Re: Ten Years of TypeScript

#84
post #72

Typescript as a language isn't too bad but the ecosystem is an absolute dumpster fire. NPM is terribly fragmented, costs a fortune in effort to maintain dependencies, security updates etc... Every Typescript/JS project I work on is full of a dangerous amount of third party dependencies - it can be hundreds if not thousands in a single repo - many of them fragile in their own special way. Language packages management…

Typescript as a language is better than "isn't too bad", it's great! I love the syntax for unions and how normal things like "if" will narrow types.

But I agree that it's a shame that the JS ecosystem is such a mess. Granted, dealing with it is essentially Typescript's purpose, but I would love for it to be a full fledged language on its own, divorced from JS. How cool would it be if you could write normal backend apps in it and compile them to native code?

I use Deno a bit and pretend, but it's not quite the same.

Re: Ten Years of TypeScript

#86
post #58

I've spent the last two years working with TypeScript solely. Coming from ~20 years with PHP and using Kotlin and Dart for some years as well, I feel that I'm doing something wrong. I absolutely loathe working with TypeScript. The community is the most fragmented I've ever experienced, the silly amount of package managers, builders... TypeScript just doesn't fit with me.

Yeah — TypeScript is great in a vacuum, and if you’re working on an established project that’s got all the tooling configured perfectly it can be a pleasure… but if you’re starting from the ground up, it can be a god awful nightmare.

I think typescript is great but the heavy, heavy dependency on starter kits that come with a dozen build dependencies configured to within an inch of their life is a testimony to how much of TypeScript is voodoo.

Every dependency you add to a project requires new incantations and prayers and probably some sort of sacrifice.

Re: Ten Years of TypeScript

#87
post #10

As a web-focused software engineer, I can safely say TypeScript is the best thing that happened to my work in the last decade. Aside from the known direct benefits of safety and self-documentation, I've found over time that having a pleasant, smooth coding experience and producing elegant code required me to think differently. I work on a project with very complicated and overloaded business logic, but nowadays my co…

I came to TypeScript from Clojure/ClojureScript, which in turn I came to from untyped JavaScript. At this point I’d say both Clojure and TypeScript had equally the greatest impact for me. Clojure helped me understand how to reason about managing state over time in a way I carry to everything I’ve worked on since. TypeScript helped me understand how to reason about interfaces between operations and guarantees about state over time, which again will be with me anywhere I go… in projects I maintain now which haven’t yet migrated from JS to TS, and if I ever get motivated to return to lisps for business or pleasure.

Re: Ten Years of TypeScript

#88
post #10

As a web-focused software engineer, I can safely say TypeScript is the best thing that happened to my work in the last decade. Aside from the known direct benefits of safety and self-documentation, I've found over time that having a pleasant, smooth coding experience and producing elegant code required me to think differently. I work on a project with very complicated and overloaded business logic, but nowadays my co…

The real genius of it is that it's really not a "type" system at all: it's a contract system. The nearest thing like it was Eiffel. The new "satisfies" feature in 4.9 makes this even more clear. Honestly there's so much space to cover here, I think it's just going to keep getting better and better.

I’m curious what you’re distinguishing here. To me a type system and a contract system are identical concepts with different descriptions.

It seems like you might be highlighting the structural typing aspects of TypeScript’s type system versus nominal or concrete types in many others, but that’s been clear for most TS usage for since well before `satisfies` so I’m not sure if my interpretation is right.

Re: Ten Years of TypeScript

#89
post #72

Typescript as a language isn't too bad but the ecosystem is an absolute dumpster fire. NPM is terribly fragmented, costs a fortune in effort to maintain dependencies, security updates etc... Every Typescript/JS project I work on is full of a dangerous amount of third party dependencies - it can be hundreds if not thousands in a single repo - many of them fragile in their own special way. Language packages management…

Typescript as a language is better than "isn't too bad", it's great! I love the syntax for unions and how normal things like "if" will narrow types. But I agree that it's a shame that the JS ecosystem is such a mess. Granted, dealing with it is essentially Typescript's purpose, but I would love for it to be a full fledged language on its own, divorced from JS. How cool would it be if you could write normal backend ap…

I agree, I wish there was more incentive for developers (especially on the front end side!) to not install every package under the sun and instead be a little less "fancy" or aim for satisfying the 90% rather than the 100%.

Re: Ten Years of TypeScript

#90
post #58

I've spent the last two years working with TypeScript solely. Coming from ~20 years with PHP and using Kotlin and Dart for some years as well, I feel that I'm doing something wrong. I absolutely loathe working with TypeScript. The community is the most fragmented I've ever experienced, the silly amount of package managers, builders... TypeScript just doesn't fit with me.

If it’s just the tooling that makes you dislike it, the tooling is just as frustrating if you write plain JS. If you don’t have specific gripes with the TypeScript syntax and type system as such, I’d suggest trying just using it without any additional tooling (typescript as a dev dependency, tsc as the only build step) in a project amenable to that. The biggest downside is slower iteration when tsc itself is slow. But you don’t actually need all of the tooling complexity if that’s what you don’t like.
Post reply on HN