Virtual Extension By Inversion of Responsibility (Second Draft)
Lawrence Kesteloot
lk at teamten.com
Fri Jun 18 09:59:20 PDT 2010
Collin wrote:
> For that matter replacing -> with a . would be even more elegant, if possible.
The -> was my favorite part of your proposal. I want to require as
little context as possible when reading code. If magic is happening, I
want to know about it.
Also, presumably if you're writing code inside a class Foo that has an
extension method, with your proposal you'd have to write something
like:
this->forEach(...);
It would be extra weird if you got rid of -> and I were allowed to just write:
forEach(...);
and have the system magically insert "this" as the first parameter.
A better reason to avoid -> is that it might be better used for
dynamic dispatch.
Lawrence
More information about the lambda-dev
mailing list