On 2014-12-29 20:01, Christian Schneider wrote:

previously it was possible to have a few D methods "point" to the same
Objective-C method like this:

     NSView initWithFrame(NSRect frameRect) @selector("initWithFrame:")  ;
     this(NSRect frameRect) @selector("initWithFrame:")  ;

Now with the latest version I get this error for the above two lines:

../../Interfaces/appkit/view.d(19): Error: constructor
appkit.view.NSView.this Objcective-C selector 'initWithFrame:' already
in use by function 'initWithFrame'.

I thought, it was a nice convenience to make both potential types of
programmers happy, those leaning more towards Objective-C / named
parameters can use the verbose, first option, while the ones coming more
from C/C++ can use the shortcut, the 2nd option.

But it's no big deal, I'll just remove the "shortcut".  My question was
more for understanding why it was a) possible in the past and b) what is
the motivation behind the decision that it is no longer possible now.

I'm not sure what's happened. Perhaps it's a bug that now have been fixed. I'll add it to my todo list.

--
/Jacob Carlborg

Reply via email to