On Wednesday, 14 May 2014 at 18:05:44 UTC, monarch_dodra wrote:
...
I just had a crazy idea. "hijackable" keyword (yeah... another keyword):

Given a function:
"Ret foo(T input, Args... args) @hijackable"

Then, when the compiler sees:
"foo(input, args);"

It will always forward directly to T.foo if T.foo exists, bypassing std.foo entirely.
...

What about stuff like this:
  import some.pkg;
  some.pkg.foo(x);

Does this still call x.foo()? What if 'foo' is an alias for 'bar', or vice versa?

Reply via email to