[phobos] Time to get ready for the next release

Jonathan M Davis jmdavisProg at gmx.com
Thu Apr 21 12:39:25 PDT 2011


> On Thu, 21 Apr 2011 13:45:09 -0400, Jonathan M Davis <jmdavisProg at gmx.com>
> 
> wrote:
> >> As I've said before, we really need to decide whether @property has
> >> loose
> >> or strict semantics. Loose semantics means that non- at property functions
> >> would still be callable without (), etc but @property functions wouldn't
> >> be allowed to have ()s. Frankly, I hate @property, want to to have as
> >> little effect as possible, like the flexibility of being able to call
> >> the
> >> same function both ways, and would have a lot of code break if this were
> >> taken away, so my vote is loose semantics.
> > 
> > TDPL specifically gives it strict semantics. @property functions must be
> > called without parens, and non- at property functions must be called with
> > them.
> > So, if we want to go with loose semantics, then TDPL will need to be
> > changed.
> > 
> > Personally, I don't see much point to @property if its semantics are
> > loose.
> > 
> > - Jonathan M Davis
> 
> The point of @property, and the reason it was included in the language at
> all, was to provide property syntax to the corner case of a returning a
> zero-argument delegate from a function. That's all. That was the only
> argument which was considered strong enough out of the many forum
> discussions to warrant language status. Furthermore, @property was
> explicitly defined at the time as having loose semantics. Regarding TDPL,
> Andrei has expressed serious concerns with going whole-hog @property since
> getting more experience with actually using it, so I don't feel that TDPL
> is a strong guideline.
> 
> My point is that a strict interpretation of @property has not seriously
> been discussed in the D community, and that any decision made here needs
> to be elevated to the D newsgroup before implementation.
> 
> My position comes down on the side of loose semantics with no method of
> strict enforcement, optional or otherwise.

I know that there are a number of people on the list - particularly newer 
posters - who fully expect @property to be strict and are surpised when it 
isn't. And I see _zero_ problem with strong property enforcement as long as 
the compiler isn't buggy with regards to properties (which it currently is). 
So, I'm 100% behind strict enforcement.

- Jonathan M Davis


More information about the phobos mailing list