Fully dynamic d by opDotExp overloading

Leandro Lucarella llucax at gmail.com
Fri Apr 17 16:15:45 PDT 2009


Nick Sabalausky, el 17 de abril a las 17:45 me escribiste:
> >> There is a lot of black magic already doing on that makes much harder to
> >> see what's really going on with a piece of code (operator overloading?).
> >> If you don't like that, you should probably stick to C =)
> 
> There a point I keep bringing up that keeps getting ignored: the 
> code-obscuring "black magic" that we already have provides real non-trivial 
> benefits. I have yet to see an equally compelling case for the ability to 
> call a dynamic method without an explicit dispatcher.

What do you call "non-trivial"?

Because I can see people seeing foreach a trivial benefit. After all you
can allways write the for loop explicitly calling some methods.

> > It's more than just convenience; it's integration. Uniform form allows 
> > generic algorithms to operate on a variety of types. Somehow this argument 
> > keeps on being ignored in the discussion.
> >
> 
> That's not ignored at all, in fact I've already addressed it twice before: A 
> reflection API that supports method invokation allows for generic calling of 
> both static and dynamic functions.

The code for that would be so ugly I that nobody will agree to use it...
I will be just a non-feature. Are you suggesting writting all generic code
using something like traits(invoke, obj, "some_function", args) instead of
obj.some_function(args) to be able to be use some dynamic method?

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
- is there a perl version of php?...
  cause i have cgi-bin access with perl and want to use php scripts.



More information about the Digitalmars-d mailing list