Monads compared to InputRanges?

Dicebot public at dicebot.lv
Wed Dec 4 05:24:18 PST 2013


On Wednesday, 4 December 2013 at 12:08:32 UTC, Shammah Chancellor 
wrote:
> I was talking on the D newsgroup about using an interface type 
> and implementing isConceptOf!(<interface>) to be used with 
> structs.    Wouldn't that fix the problem?
>
> -Shammah

No. D does not check if code of template actually conforms its 
constraint. You can still call functions that are not guaranteed 
to be there by constraint thus it is not really a type class / 
concept, just syntax convenience for constraint.


More information about the Digitalmars-d-learn mailing list