4 ms·
What's wrong with: (cat-logs [& entries] ...) If we care about human understanding of the contract, types are no better than names. reverse :: [a] ->
by sooheon 7y ago
What's wrong with:
(cat-logs [& entries] ...)
If we care about human understanding of the contract, types are no better than names.
reverse :: [a] -> [a]
(reverse [xs] ...)
- asdfasdfasdfa 7y agoNames can and do lie, types are checked by the compiler. Also in you example, is an entry a string? a dict? its own class? who knows.
- zmmmmm 7y ago> If we care about human understanding of the contract, types are no better than names. That depends on your familiarity with the code though. Yes if you are deeply familiar with the code you probably know what data type an "entry" is. But come to it cold and trying to reverse engineer code like that in the middle of a complex system to understand it is frightening (at least, in my experience).