Andrei Alexandrescu wrote:
Michel Fortin wrote:
On 2009-04-18 22:21:50 -0400, Andrei Alexandrescu
<seewebsiteforem...@erdani.org> said:
I did, but sorry, it doesn't make sense and does nothing but continue
the terrible confusion going in this thread.
Then let's try to remove some of that confusion.
Thanks for doing so. Given that my wits are spent with regard to this
thread, I am replying out of respect for the considerable effort you
have put in writing an explanation.
I agree that method names swallowed by opDotExp will not be exposed to
any reflection mechanism and that that can be a drawback. But sometimes
you don't even want to exhaustively generate all method names. In the
Pascalize example, you wouldn't want to generate all case combinations
of your methods. Also in the swizzle example, maybe you don't want to
compulsively expose all of the xyzw combinations.
You completely lost me about the necessity of a standardized catch-all
function. My view is that if you want to forward to someone else, you
just call the runtime invoke() for the guy you want to forward to. So I
see exactly zero need for a standardized catch-all, and a red herring in
the discussion about the syntactic help brought about by opDotExp.
The utility is when you are looking for methods to invoke via runtime
reflection, you can determine that a given function is one of these
runtime opDotExp equivalents.
I don't know how useful this is, in point of fact. Unless there's a
standard system in D for integrating with scripting languages, anyway.