@property needed or not needed?

Michael pr at m1xa.com
Tue Dec 4 12:14:15 PST 2012


>> void f()
>> {
>>     writeln("hi");
>> }
>>
>> f; // this currently works
>>
>>
>> I don't know if this is possible to implement.
>
> I expect it is, perhaps by disallowing calling a property 
> function with no arguments.

It's regular function called as property [getter] of module.
It's nice to have @property like in C#, and permit calling 
without () only to @property.

function without () - property - for simple tasks.
function/procedure/action with () - for resource-intensive tasks.



More information about the Digitalmars-d mailing list