On Thu, 12 Jul 2012 16:27:39 -0400, Andrei Alexandrescu <seewebsiteforem...@erdani.org> wrote:

On 7/12/12 4:20 PM, Steven Schveighoffer wrote:
I think this discussion is somewhat academic at this point, as Andrei
seems not too keen on the idea of having dual base classes.

Well I wasn't keen on eliminating the four methods and look what happened!

My personal opinion is we should simply eliminate the four methods (or at least the three required for AAs), fix AAs, and deal with the fallout. I can't really remember the last time I simply used obj1.opEquals(obj2) to do comparisons instead of obj1 == obj2 (which should do the right thing if obj1.opEquals(obj2) is valid). The code that relies on this is probably very rare. I certainly would *love* to rewrite all my opCmp and opEquals functions to accept the minimal base class instead of doing the dual dispatch dance with Object parameters.

I'm also actually not liking using Object as the scorned child of RawObject, I'd rather keep Object as the base, and use something like OldObject as a different base class, or maybe use an interface.

I still am not keen on having a runtime vtable comparison to see if we want to mimic old behavior, how does one declare "this comparison isn't valid" to the compiler? That is one of the main benefits I see with dumping the methods.

-Steve

Reply via email to