[phobos] Time to get ready for the next release
David Simcha
dsimcha at gmail.com
Thu Apr 21 12:41:17 PDT 2011
How about the amount of existing code it breaks? How about the fact that it
breaks using the same function for both method chaining and with property
syntax?
On Thu, Apr 21, 2011 at 3:39 PM, Jonathan M Davis <jmdavisProg at gmx.com>wrote:
> > 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 propertyfunctions
> > >> 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
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20110421/2821d730/attachment.html>
More information about the phobos
mailing list