Function calls

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Jan 29 07:29:30 PST 2010


Steven Schveighoffer wrote:
> On Thu, 28 Jan 2010 20:51:29 -0500, Andrei Alexandrescu 
> <SeeWebsiteForEmail at erdani.org> wrote:
> 
>> Nick Sabalausky wrote:
>>> "Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in 
>>> message news:hjtcbd$r0a$1 at digitalmars.com...
>>>> Nick Sabalausky wrote:
>>>>> And yes, I already pointed out that would make it a no-argument 
>>>>> function. And that's precisely my point. If we accept that it's bad 
>>>>> to paint a car via its "@property" wheel, then how can we possibly 
>>>>> accept this to not be just as bad?:
>>>>>
>>>>> auto car = new Car();
>>>>> auto wheel = car.getWheel_ThisIsAFunctionNotAProperty();
>>>>> wheel.paintTheCar();
>>>> Because a function doesn't attempt to emulate a field.
>>>>
>>>  D's approach to properties *forces* functions to emulate fields.
>>
>> Unfortunately not. It forces nothing. That's my problem with the 
>> feature - it's nothing more than fostering a convention.
> 
> It forces a convention.

It forces you to define a convention as vacuous and open to 
interpretation as any other. Not a quantum leap I reckon.

Andrei



More information about the Digitalmars-d mailing list