Uniform Function Call Syntax in D - GameDev.net

d coder dlang.coder at gmail.com
Tue Jul 3 05:26:23 PDT 2012


> Thanks to C++ for inspiration, I even have proposal for such
> syntax!
>
>        obj.free myFunc( args )
>        obj.member myFunc( args )
>
>
How about:

obj.myFunc( args ); // calls member function, even if free function exists
myFunc( obj, args ); // calls free function, even if member function exists

That is the current behavior.  :-)

Regards
- Puneet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20120703/3b8e972c/attachment.html>


More information about the Digitalmars-d-announce mailing list