Re: Uniform Function Call Syntax in D - GameDev.net

2012-07-03 Thread d coder
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

Re: Uniform Function Call Syntax in D - GameDev.net

2012-07-03 Thread bearophile
Jonathan M Davis: Yes, but as I said, if it _didn't_ select the member function when there was a conflict, it would be impossible to call the member function whenever there was a conflict. There is no way to indicate that you mean a member function rather than a free function. The normal way

Re: Uniform Function Call Syntax in D - GameDev.net

2012-07-03 Thread Jonathan M Davis
On Tuesday, July 03, 2012 21:55:47 bearophile wrote: So maybe it's worth accepting this limitation, to reduce confusion for the people the read the code. I would give a resounding no on that one. The confusion on how to actually manage to be able to use your member function would t hen be even

Re: Uniform Function Call Syntax in D - GameDev.net

2012-07-03 Thread Timon Gehr
On 07/03/2012 09:55 PM, bearophile wrote: Jonathan M Davis: Yes, but as I said, if it _didn't_ select the member function when there was a conflict, it would be impossible to call the member function whenever there was a conflict. There is no way to indicate that you mean a member function

Re: Uniform Function Call Syntax in D - GameDev.net

2012-07-02 Thread Kapps
On Monday, 2 July 2012 at 05:55:20 UTC, dennis luehring wrote: Am 02.07.2012 07:13, schrieb Jonathan M Davis: On Monday, July 02, 2012 07:00:23 dennis luehring wrote: Am 01.07.2012 23:02, schrieb Walter Bright: On 7/1/2012 11:53 AM, Nick Sabalausky wrote: That successfully compiles and

Re: Uniform Function Call Syntax in D - GameDev.net

2012-07-02 Thread Jonathan M Davis
On Monday, July 02, 2012 07:54:56 dennis luehring wrote: Am 02.07.2012 07:13, schrieb Jonathan M Davis: On Monday, July 02, 2012 07:00:23 dennis luehring wrote: Am 01.07.2012 23:02, schrieb Walter Bright: On 7/1/2012 11:53 AM, Nick Sabalausky wrote: That successfully compiles and prints

Re: Uniform Function Call Syntax in D - GameDev.net

2012-07-02 Thread Ali Çehreli
On 07/01/2012 11:11 PM, Jonathan M Davis wrote: Yes, but as I said, if it _didn't_ select the member function when there was a conflict, it would be impossible to call the member function whenever there was a conflict. I wouldn't be a fan of it but I think it would still be possible:

Re: Uniform Function Call Syntax in D - GameDev.net

2012-07-02 Thread xenon325
On Monday, 2 July 2012 at 06:11:22 UTC, Jonathan M Davis wrote: So, without adding new syntax to the language, it was essentially impossible to do anything other than pick the member function whenever there's a conflict. Thanks to C++ for inspiration, I even have proposal for such syntax!

Uniform Function Call Syntax in D - GameDev.net

2012-07-01 Thread Andrei Alexandrescu
http://www.reddit.com/r/programming/comments/vvpfy/uniform_function_call_syntax_in_d_gamedevnet/ Andrei

Re: Uniform Function Call Syntax in D - GameDev.net

2012-07-01 Thread Nick Sabalausky
On Sun, 01 Jul 2012 11:13:10 -0400 Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: http://www.reddit.com/r/programming/comments/vvpfy/uniform_function_call_syntax_in_d_gamedevnet/ Andrei Good article. One of the commenters brought up a point about confusion from possible conflicts

Re: Uniform Function Call Syntax in D - GameDev.net

2012-07-01 Thread dennis luehring
Am 01.07.2012 23:02, schrieb Walter Bright: On 7/1/2012 11:53 AM, Nick Sabalausky wrote: That successfully compiles and prints Member. Same thing happens if you move the UFCS func and Foo definition out into their own separate modules. But I was expecting a conflict error at compile-time. Is

Re: Uniform Function Call Syntax in D - GameDev.net

2012-07-01 Thread Jonathan M Davis
On Monday, July 02, 2012 07:00:23 dennis luehring wrote: Am 01.07.2012 23:02, schrieb Walter Bright: On 7/1/2012 11:53 AM, Nick Sabalausky wrote: That successfully compiles and prints Member. Same thing happens if you move the UFCS func and Foo definition out into their own separate

Re: Uniform Function Call Syntax in D - GameDev.net

2012-07-01 Thread dennis luehring
Am 02.07.2012 07:13, schrieb Jonathan M Davis: On Monday, July 02, 2012 07:00:23 dennis luehring wrote: Am 01.07.2012 23:02, schrieb Walter Bright: On 7/1/2012 11:53 AM, Nick Sabalausky wrote: That successfully compiles and prints Member. Same thing happens if you move the UFCS func and Foo