[phobos] Time to get ready for the next release
Jonathan M Davis
jmdavisProg at gmx.com
Thu Apr 21 13:14:22 PDT 2011
> On Thu, 21 Apr 2011 15:57:57 -0400, Jonathan M Davis <jmdavisProg at gmx.com>
>
> wrote:
> >> 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?
> >
> > Something like
> >
> > auto b = a.prop1.prop2.prop3;
> >
> > should work. I doesn't at present, but it should. There's a bug report
> > on it.
>
> What about auto b = a.prop1(5).prop2(6).prop3(7); ?
I'd consider that to be the same. It should work, but it doesn't. There's a
bug report for it.
> > As for breaking existing code, _of course_ it's going to. That's to be
> > expected, and I would have thought that that was expected when @property
> > was
> > introduced in the first place.
>
> Actually, no it wasn't expected. @property was introduced with loose
> semantics, not strict semantics. And, by the way, it was judged worth
> while with only loose semantics.
Virtually every discussion I recall about @property has indicated that we
expected to have strict semantics eventually. It's been long enough, that I
don't remember all of the discussions about @property when it was intially
introduced, but I believe any discussion of @property that's happened at all
recently and discussed enforcement expected there to be strict semantics
eventually. And there have been several confused newbies posting about how
@property wasn't enforced.
- Jonathan M Davis
More information about the phobos
mailing list