Re:Elm from a Business Perspective
by marcosdumay on Thursday November 10, 2016 @11:15AM
(#12921650)
!?
Of course you save no code on definitions. Some may even get more verbose.
You save code on usage, because you can use generic functions that will work for any instance of Show, instead of specifying them for every type.
Likewise, map operations, fold. They need to be written and used.
I'm sceptical of Elm's claim that typeclasses aren't useful, but your post doesn't show what it sets out to, because it lacks concreteness.
Out of your post, it is only when you get to function composition that typeclasses can theoretically help — but the question isn't, can they theoretically help, it's do the help in practice.
So can you show some example? To meet the challenge and provide convincing evidence that a language without typeclasses is lacking, you would need to say "This is what the code is. And this is what it could be with typeclasses". Unless you do that, Noredink's claim that their code wouldn't be simplified with typeclasses stands.
I do not think you are obliged to do this. It is perfectly legitimate for you to ignore my message. But I think both sides can agree that this is what would be convincing to the anti-typeclassists.