3 ms·
> The author shows how you can, when posed with just knowing the type you want to achieve, more or less generate/infer the implementation from that. All this m
by dragonwriter 7y ago
> The author shows how you can, when posed with just knowing the type you want to achieve, more or less generate/infer the implementation from that.
All this means is that, with a robust enough type system, determining the correct type is exactly as complex as determining the correct implementation.
In some cases, in some languages, expressing the solution in the language of types may be more intuitive than and help guide the language of implementation, but, because they are essentially encoding each other, that's not only as subjective as any question of what is intuitive must be, but also an artifact of the particular type language and implementation language. In a different implementation language, the problem may be as (or more!) intuitive as it is in the type language in use.