Still unresolved (Was: D1->D2 member call syntax regression?)

Nick Sabalausky a at a.a
Wed Jul 28 12:30:16 PDT 2010


"Nick Sabalausky" <a at a.a> wrote in message 
news:i2pvvi$2g83$1 at digitalmars.com...
> "bearophile" <bearophileHUGS at lycos.com> wrote in message 
> news:i2p4iq$po$1 at digitalmars.com...
>> Nick Sabalausky:
>>> That's because my original example accidentally made Foo an 
>>> uninstantiated
>>> class template, so the compiler never bothered to check the semantics...
>>
>> Surely here there is no shortage of ways I can paint myself as a stupid 
>> :-)
>> In Python the () after the class name are optional and they do nothing, 
>> so I didn't see them in that little D program :-)
>>
>
> *I'm* the one that was dumb enough put them there in the first place! And 
> I can't use "extensive Python experience" as an excuse ;)
>

It still leaves the question though, "Why isn't that working in D2? Bug or 
legitimate reason?".

Jonathan suggested it was deliberate because of the hidden "this" parameter, 
but I'm not convinced because 1) D1 has the hidden "this" param too, but it 
handles it just fine, and 2) It's just a syntactical issue, so I don't see 
how semantics could be a problem unless there's some other change in D2 that 
causes a conflict or ambiguity with that feature.

In any case, the error message seems to indicate that, deliberate or not, 
it's likely some sort of symbol-lookup/visibility issue.




More information about the Digitalmars-d-learn mailing list