D's type classes pattern ?

matovitch via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Mar 24 09:37:17 PDT 2015


To resume my goal (last lonely message I promise), how can you 
statically check a type implement an interface without making 
this type inherit the interface (otherwise std.traits would do 
it) ?

ps : it seems to me that this is exactly what the haskell 
compiler do with type classes <- layman opinion


More information about the Digitalmars-d-learn mailing list