2 ms·
Yeah unfortunately this is one of the problems, bolting on the types rarely works as well as it does for Typescript (looks quite natural to me). In Haskell for
by hardwaresofton 5y ago
Yeah unfortunately this is one of the problems, bolting on the types rarely works as well as it does for Typescript (looks quite natural to me).
In Haskell for example, writing signatures is actually both unnecessary (they will be inferrable, most of the time so it's basically only for humans to read) and a net positive (they fit well prose wise and you can use them as documentation) but that's a harder hill to climb.
I do want to note that one big advantage of specifying signatures is that now your IDE can help you when using the functions and detect when something is going wrong.
Maybe "no more trying to figure out what the input/output of a function that you didn't write is supposed to be" would be a draw?