Getting consistent behavour for class properties
Lodovico Giaretta via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Oct 2 12:11:54 PDT 2016
On Sunday, 2 October 2016 at 17:10:58 UTC, mikey wrote:
> There is already a degree of transparency with how properties
> being handled for example in allowing properties to be an
> lvalue if they have a setter.
>
> t.val = 42;
Actually, this is not specific to properties, as it also works on
"standard" methods, if they have a single parameter:
import std.stdio;
void main()
{
writeln = 42;
}
More information about the Digitalmars-d-learn
mailing list