22 ms·
Fetishization is the correct word for it. Most people, especially the ones who think typing everything is a great idea, don't understand the difference between
by 12f5dc43-1661 5y ago
Fetishization is the correct word for it.
Most people, especially the ones who think typing everything is a great idea, don't understand the difference between types and constraints.
Constraints, for some reason, are incredibly easy for humans to understand. Simple constraints and types match well enough that pretty much all tutorial examples can be done in either without too much difficulty. That gives people the misplaced confidence that everything that can be done in constraints can be done in types. Which is simply not the case.
For the simplest example: what is the type of the identity function? You get into polymorphic types and type variables to get a satisfactory answer, which is by no means obviously true, and fall down the rabbit hole of having your type system be Turing complete too. Which kind of defeats the purpose of types since now you have to deal with all the goodness of undecidability not only horizontally in your code, but vertically in your types.
That is not to say that types are useless, they aren't, but when you start really dealing with higher order functions they are not worth the hassle as defined in any language today.