So - if type classes *must* have guaranteed global instance uniqueness, then that's fair - Scala doesn't have type classes according to that definition. But then - why do you consider that Haskell, as implemented in GHC, does?
-
-
Haskell, the language will refuse to compile it. Simply, it violates the language standard. You must turn off this standard to break the rules. Though I'm much more interested in the question, "is there a valid or practical reason to turn off those rules?" Hard: no.
1 reply 0 retweets 0 likes -
Yes, I agree with that: Haskell, the language, has that guarantee. But GHC, one possible but popular implementation of the language, doesn't. My point has always been GHC doesn't have type classes according to that definition, not Haskell doesns't.
2 replies 0 retweets 0 likes -
Right, but from my PoV, this is just holding up a trophy (or not). What are the practical consequences? Much more useful and interesting question. Does Scala have functional dependencies? Not in any *useful* sense. What about dependent types? Again, no. Type-classes? Also no.
1 reply 0 retweets 0 likes -
Yes, that is fair - it *is* holding up a trophy, or rather, the opposite. This was what my very first tweet was about - frustrating at people telling me "Scala doesn't have type classes because global uniqueness!". Neither does Haskell's most popular implementation.
1 reply 0 retweets 0 likes -
Replying to @NicolasRinaudo @dibblego and
Is GHC's encoding of type classes more useful than Scala's? That is a matter of some debate, and I have no intelligent point to make there. Is Haskell a better language than Scala? Again, nothing clever to contribute. Just... stop bragging about global instance uniqueness.
1 reply 0 retweets 0 likes -
Replying to @NicolasRinaudo @dibblego and
(Not you specifically - you don't, that I can see. But since I've given a talk on type classes, I do get lots of "why are you talking about type classes, Scala doesn't have them, you don't know what you're talking about" comments. *That* is the source of my frustration).
1 reply 0 retweets 0 likes -
"does or does not have X" is a longstanding tradition for programming, especially within Scala. It allows us to avoid the hard questions, such as, "is X actually useful?" I find it boring and ego-centric, not frustrating.
1 reply 0 retweets 0 likes -
Just to be clear though, these comments weren't from the Scala community...
1 reply 0 retweets 0 likes -
Replying to @NicolasRinaudo @dibblego and
Anyway, thanks for helping me understand your point of view better. I agree that "Haskell doesn't have X" isn't useful, but being repeatedly told "Scala sucks because it doesn't have X that Haskell" does over and over again, even when provably false, is frustrating.
2 replies 0 retweets 0 likes
Haha yeah no problem. Good talking to you. Just ignore the nonsense, is my advice.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.