RFC: Implementation of binary assignment operators (e.g s.x += 2) for @property functions

Johan Engelen via Digitalmars-d digitalmars-d at puremagic.com
Tue Aug 15 13:50:11 PDT 2017


On Tuesday, 15 August 2017 at 03:53:44 UTC, Michael V. Franklin 
wrote:
> An implementation of binary assignment operators for @property 
> functions has been submitted to the DMD pull request queue at 
> https://github.com/dlang/dmd/pull/7079.
>
> [snip]
>
> Walter has requested that I make this forum post to inform the 
> community of this change in an effort to discuss its merits 
> and/or shortcomings.
>
> We ask for your comments whether they be in approval or 
> disapproval of this pull request so we can determine the best 
> way forward.

Thanks for the heads up. I think this would have been good for a 
DIP, to better guard against bad interplay with other D 
constructs.
I've added to the PRs a few comments that immediately came to 
mind.

It seems you already spent some time trying to break the new 
mechanics, that's good. But perhaps we need some more breakage 
;-)  (for example I think we can dig a little deeper down the 
opBinary hole)

-Johan



More information about the Digitalmars-d mailing list