If I had my way

Mehrdad wfunction at hotmail.com
Tue Dec 13 01:54:46 PST 2011


On 12/12/2011 9:28 PM, Jonathan M Davis wrote:
> On Monday, December 12, 2011 21:17:10 Mehrdad wrote:
>
>> Member functions always take precedence in C#, and it works perfectly
>> well. There's really no problem in practice.
> I'm not saying that it can't be done. I'm just saying that all of the corner
> cases and the like have to be sorted out such that the feature is completely
> defined, and we don't have ambiguities that are going to cause problems. Things
> are complicated enough with alias this and opDispatch and the like. Adding yet
> another way to add functions to a type complicates things that much further.
> So, UFCS needs to be carefully designed, and that's more of an issue IMHO than
> the exact syntax used to determine if a function is supposed to work with
> UFCS.
>
> - Jonathan M Davis
Just wondering, what _are_ the corner cases?

Whatever is already accessible through the object would automatically 
override -- whether it's alias this, opDispatch, or whatever. Only if 
everything fails, then would extension methods work.
Wouldn't that work?


More information about the Digitalmars-d mailing list