Real World usage of D, Today (was Re: challenge #2: implement the varargs_reduce metafunction)

Walter Bright newshound at digitalmars.com
Thu Jan 25 22:45:05 PST 2007


John Reimer wrote:
> On Wed, 24 Jan 2007 23:12:21 -0800, Andrei Alexandrescu (See Website For
> Email) wrote:
> 
>> Bill Baxter wrote:
>>> Well there is this issue that &foo where foo is an overloaded will give 
>>> you pointer to the first version of foo in the source file.  There's no 
>>> way to disambiguate as far as I know.  Particularly frustrating for 
>>> property methods
>>>
>>>    void prop(float x) { ... }
>>>    float prop() { ... }
>>>
>>>
>>> &prop just gives you the first one no matter what.
>>>
>>> Maybe not what you're talking about with "matching using constants" but 
>>> it is related to signature matching (or lack thereof).
>> Ouch. This warrants a bug report. It sure has ripples in lots of 
>> template code, too.
>>
>> Andrei
> 
> 
> That's not considered a bug, however.  There have been many complaints
> about D's signature lookup "protocol" over the last 2 to 3 years.  Walter
> has many times stated that it's done that way on purpose, I think to
> avoid compiler complexity. Maybe this example shows yet another reason why
> it hurts, but we've had no success convincing him otherwise.  That's just
> one example of "silent acception" of the symbol.  I'm actually surprised
> that Walter didn't invalidate that bug report.

I didn't invalidate it because it is a bug. The lookup thing was a 
debate about whether Java-style or C++-style overriding is done. D does 
C++ style overriding.



More information about the Digitalmars-d mailing list