Hello Adam,

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.

Going the other way would be better; '.' works as Andrei wants and '->' is an explicit, "don't use the dynamic stuff" invocation. If it went the other way virtually all template code would end up needing to use '->' for everything just in cases someone wants to pass in a type that uses opDotExp.


Reply via email to