Hacker News new | ask | show | jobs
by knome 516 days ago
You were going to have to deal with that complexity either way.

Now it's expressed somewhere, and if you craft it right, enforced so it's harder to get things wrong.

https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-va...

1 comments

This view has always been bullshit. It doesn't differentiate between the complexity of the types themselves and the complexity of representing them in a static type system.
It certainly isn't bullshit. I take advantage of type systems every day to help me write code that works on the first try. Obviously I'm not saying all my code works on the first try, but it often does even when it's quite complex.

The main problem is that a lot of developers don't know how to use the type system well, so they write code in a way that doesn't take advantage of the type system. Or they just write bad code in general that makes life difficult despite a type system.

It doesn't solve all problems, but if you use it well it can solve a lot of problems very elegantly.