3 ms·
I think this is noisy. f(x: a, y: b): c = ... I think this is nice. f :: a -> b -> c f x y = ... Signatures are useful as self-documentation, and keep
by jim-jim-jim 5y ago
I think this is noisy.
f(x: a, y: b): c = ...
I think this is nice.
f :: a -> b -> c
f x y = ...
Signatures are useful as self-documentation, and keeping them separate makes that easy to scan.
It also comes down to the compiler. If you're "annotating" your code with type "sugestions," but don't get any ironclad guarantees from it, then it's reasonable to question whether it's even worth the effort. I may be misremembering things, but "typed" versions of Python and Scheme aren't particularly rigorous.