3 ms·
> Except in TS this truly has no benefit besides superficial perception of improved type safety. You know the saying that everyone who drives slower than you i
by feoren 2y ago
> Except in TS this truly has no benefit besides superficial perception of improved type safety.
You know the saying that everyone who drives slower than you is a moron, and everyone who drives faster than you is a lunatic? You seem to be in a mode of "every type system more powerful than what I'm used to is unnecessary", and I'm sure you believe the other half: "every type system weaker than what I'm used to is for morons".
Keep in mind, this article is about a detail inside the compiler that makes type inference "just work" seemingly magically. It's not a detail you need to worry about. If you think powerful type inference and mapped types are just for the "perception of improved type safety", you are revealing that you have simply never attempted to learn them.
> if you have powerful type system, it does not mean it warrants pushing it to its limits, and strikes me as the behavior everyone tends to suffer from in the middle of a learning process of a new tool.
These kinds of features are more for library developers. You should be very glad that the people who make the libraries you rely on every day have access to these kinds of features, because when they do their job well, things "just work" so invisibly that you have no way of appreciating what's actually going on in the background. These "astronaut developers" that you disrespectfully deride are the entire reason you're able to do your job at all. Have a little respect.
- neonsunset 2y agoIf you pay attention to phrasing "hurts Rust", you may notice that this isn't a criticism of TS by itself but rather the misuse of its type system, and the certain set of commonly adopted norms that I personally happened to get presented with when interacting with it in the past, examples in this article being a continuation of the trend. It isn't about expressivity or lack of thereof but unnecessary steps taken to achieve point B from point A.