News for hackers. Stuff that matters.
Re:Haskell Typeclasses vs. C++ Classes by bad_user on Wednesday October 18, 2017 @02:31AM (#15497305)
I didn't know that, but it doesn't surprise me, seems to me like C++ templates are like their own language grown within C++ and can do lots of crazy things.
Re:Haskell Typeclasses vs. C++ Classes by Klockan on Wednesday October 18, 2017 @03:33AM (#15497521)
It is fairly straightforward, created a pastebin showing how it can be done, you can also make it check that it is implemented at compile time but the logic around that is a bit iffy:

https://pastebin.com/DiFh4GuM