DIP23 draft: Fixing properties redux
Johannes Pfau
nospam at example.com
Sun Feb 3 07:49:05 PST 2013
Am Sun, 03 Feb 2013 10:37:45 -0500
schrieb Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org>:
> On 2/3/13 7:34 AM, Jacob Carlborg wrote:
> > On 2013-02-03 09:16, Andrei Alexandrescu wrote:
> >> Walter and I have had a discussion on how to finalize properties.
> >>
> >> http://wiki.dlang.org/DIP23
> >
> > What about:
> >
> > writeln = "asd";
> >
> > Allowed or not?
>
> No because writeln is not a property. For non-properties there's no
> lowering of assignment.
>
> Andrei
>
Then this should be removed in the proposal:
If a function returns a reference, then assignment through the
paren-less call should work:
unittest
{
static int x;
ref int fun1() { return x; }
fun1 = 42;
}
More information about the Digitalmars-d
mailing list