[Issue 17474] non-property being treated as a property

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jun 14 11:11:12 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=17474

--- Comment #11 from Eyal <eyal at weka.io> ---
(In reply to anonymous4 from comment #10)
> (In reply to Eyal from comment #8)
> > Requiring @property on a for a=b to invoke a(b) sounds much more reasonable
> > than the opposite.
> > 
> > I don't see how a=b invoking a(b) when a isn't a @property is justifiable.
> 
> It reduces code littering (and it's not easier to check). UFCS relies on
> property syntax too.

What code littering does it reduce? @property is not littering, it is
informative.

UCFS doesn't rely on property syntax, lack of parenthesis relies on property
syntax - but not on *setter* syntax, just *getter*.

So I repeat: There is no justification for x=y calling x(y) when x is not a
@property.

--


More information about the Digitalmars-d-bugs mailing list