C#'s greatest mistakes
Michel Fortin
michel.fortin at michelf.com
Sat Nov 27 19:40:09 PST 2010
On 2010-11-27 20:55:51 -0500, Adam Burton <adz21c at gmail.com> said:
> Personally I think having an "implements" makes sense (that loops through
> the methods of an interface and checks the type has matching methods, not
> the same as having a class "implement" an interface which is more like
> inheritance). However as you say, that is not how interfaces in their
> current form are designed to be used so I understand why people disagree.
Well, if you consider the previously discussed 'adaptTo' function
template, all types can be adapted to an interface (via a
template-generated wrapper class). So "implements" for structs isn't
too far off, as you can use the struct to implement the interface via
'adaptTo'.
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list