typeid() broken for interfaces?

foobar foo at bar.com
Wed Dec 5 08:01:49 PST 2012


On Tuesday, 4 December 2012 at 18:41:14 UTC, Jonathan M Davis 
wrote:
> On Tuesday, December 04, 2012 17:35:23 foobar wrote:
>> That's a lot of duplication considering D already provides this
>> in Object.
>
> Though per the last major discussion on const-correctness and 
> Object, it's
> likely that toString, toHash, opCmp, and opEquals will be 
> removed from Object,
> in which case you'd need a derived class which implemented them 
> to use any of
> them.
>
> - Jonathan m Davis


In other words, the plan is to pretty much deprecate Object? I 
hope there would be appropriate replacement before this happens. 
Users should be able to have a standardized API and a default 
implementation for these methods.
Is phobos going to introduce interfaces such as Printable, 
Comparable, etc.. ? (names tentative, I'm more worried about the 
semantics).


More information about the Digitalmars-d mailing list