Function calls
Rainer Deyke
rainerd at eldwood.com
Fri Jan 29 18:33:27 PST 2010
Andrei Alexandrescu wrote:
> Nick Sabalausky wrote:
>> auto car = new Car();
>> auto wheel = car.getWheel_ThisIsAFunctionNotAProperty();
>> wheel.paintTheCar();
>
> Because a function doesn't attempt to emulate a field.
Not really relevant, since the same applies to fields.
auto car = new Car();
auto wheel = car.wheelFieldnotPropertyOrFunction;
wheel.paintTheCar();
In this case, the wheel field contains a pointer back to the car.
--
Rainer Deyke - rainerd at eldwood.com
More information about the Digitalmars-d
mailing list