On Monday, April 02, 2012 15:36:01 James Miller wrote: > On 31 March 2012 06:28, Jonathan M Davis <[email protected]> wrote: > > it also has > > opDot, which is being removed from the language. > > Out of curiosity, what was opDot?
An overload of the dot operator. So, if you had A a = foo(); a.func(); and A implemented opDot, instead of A's func being called, the overloaded opDot would be called. I don't know exactly how it was implemented. It's either a D1-only thing or an early D2 thing, but I've never used it, and it's not supposed to be in the language anymore (though like a number of other features that are supposed to be gone, it may not have actually have been deprecated yet). It's probably similar to how -> is overloadable in C++, which can then be useful for stuff like smart pointer types so that they can forward function calls to the object pointed to by the smart pointer. - Jonathan M Davis
