2 ms·
Interesting article. I'm puzzled by one example, though. When the author says he favors the signature: def reverse[A]: List[A] => List[A] while Tony Morri
by the_af 13y ago
Interesting article. I'm puzzled by one example, though. When the author says he favors the signature:
def reverse[A]: List[A] => List[A]
while Tony Morris would argue for:
def <-:[A, B](f: A => B): List[A] => List[B]
I'm puzzled. They are not two different styles of writing the type signature for the same function! You can tell at a glance that the type signature for "<-" allows functions more general than "reverse". So he is not talking about the same function.
Or did I misunderstand something?
- kvnwbbr 13y agoGood point! I should have clarified that example, I didn't make it clear enough that I wasn't comparing apples to apples. Both are examples from a blog post of his and I didn't want to rewrite either, more or less point out that "he likes functions that look like this" and "he doesn't like functions that look like this" while I had the opposite preference. I guess the spirit is that un-opinionated languages can always benefit from a good debate about style.