property syntax strawman

Marianne Gagnon auria.mg at gmail.com
Sun Aug 2 10:09:00 PDT 2009


Andrei Alexandrescu Wrote:
> Marianne Gagnon wrote:
> > Or, alternatively, if you really wish to keep them separate, bool empty= { ... } isn't intuitive, as Andrei pointed out, but is already less error-prone than the empty-body declaration idea I believe
> 
> I think void empty=(bool b) { ... } is a net win, which the forced bool 
> empty=() diminishes. It would be great to keep the setter and find 
> something as nice for a getter.
> 
>

If { ... } becomes the new standard way of declaring a function, that's fine with me; but if { ... } ended up being used only for properties, that would be somewhat inconsistent



More information about the Digitalmars-d mailing list