Hacker News new | ask | show | jobs
by lawn 299 days ago
Types in TS can indeed become very complex (depending on their usage of course) and it might not be the best example of the benefits.

I personally think that simpler Rust is a better example of the benefits static typing (or maybe something like Gleam).

1 comments

I'm on the fence. On the one hand I love the power of TS types that they can expose. On the other, I've seen a class of dev that, instead of relying on simple types, will try and make a monstrosity type that does unholy things.

I feel a little bit about it like I feel about RegEx. Small and simple are good, but once you start diving into the entire catalog of regex capabilities for a single expression you've made a mistake.

> On the other, I've seen a class of dev that, instead of relying on simple types, will try and make a monstrosity type that does unholy things.

Totally agree, however that love of complexity will just squeeze into something else had they not had types to have fun with.