read-only access

spir denis.spir at gmail.com
Tue Nov 2 14:14:22 PDT 2010


On Tue, 2 Nov 2010 12:47:21 -0700
Jonathan M Davis <jmdavisProg at gmx.com> wrote:

> If they don't have the property attribute, then they won't work without parens 
> (and in fact, you won't be able to use parens with them). That is how it's 
> outlined in TPDL (The D Programming Language by Andrei Alexandrescu). However, 
> dmd has not reached that point. It will still allow property functions to be 
> used with parens and non-property functions to be used as property functions as 
> long as they're void and take one parameter or return a value and take no 
> parameters. So, once dmd is up-to-date with regards to TDPL, you'll no longer be 
> able to use arbitrary functions as properties, but for the moment, you can.

I'm not sure I like it, that properties have distinct syntax -- unless there's really distinct meaning/semantics I don't know yet.

Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com



More information about the Digitalmars-d-learn mailing list