Fully dynamic d by opDotExp overloading

Adam D. Ruppe destructionator at gmail.com
Sat Apr 18 18:24:06 PDT 2009


On Sat, Apr 18, 2009 at 06:10:27PM -0700, Andrei Alexandrescu wrote:
> The point of using "." is not syntactic convenience as much as the 
> ability of the Dynamic structure to work out of the box with algorithms 
> that use the standard notation.

What if the dot remained exactly like it is now and the -> took
the place of the dot in the proposal; regular method calls when
possible and forwarded to opExtension (opDotExp needs a better name)
when that fails?

Thus your generic algorithm can use -> and work in all cases, and the
dot operator remains the same as it is now.

The obvious downside is duplication of features, but this might be
able to please everyone.

> 
> Andrei

-- 
Adam D. Ruppe
http://arsdnet.net



More information about the Digitalmars-d mailing list