Properties: a.b.c = 3
Franklin Minty
minty at monty.com
Wed Jul 29 06:07:44 PDT 2009
BLS Wrote:
> Andrei Alexandrescu wrote:
> > BLS wrote:
> >> BLS wrote:
> >>> Walter Bright wrote:
> >>>> The issue is what if b is a property, returns a temporary object,
> >>>> and that temp's .c field is uselessly set to 3?
> >>>>
> >>>> It's a classic problem with properties that are implemented as
> >>>> functions.
> >>>>
> >>>> I don't see how C#'s special property syntax adds any value for
> >>>> dealing with this.
> >>>>
> >>>> One thought I had was to simply disallow the '.' to appear after a
> >>>> function style property.
> >>>
> >>> What I don't see is why a property isn't just a property. What you
> >>> announce is more a kind of "universal maybe these value holder"
> >>> - a temporary object is not a property period
> >>>
> >>> If something is exceeding the meaning of property then fire up your
> >>> keyboard.
> >>
> >> So int'max is a property int'ILikeIt() definitely not.
> >> let's keep it simple
> >
> > I don't understand, could you please elaborate?
> >
> > Andrei
>
> Sure,
> int'max will give you (let's assume for a while that the compiler writer
> was not completely drunken) a useful answer int`ILikeIt() is probabely
> "green"
>
> I guess what I want to say is that a property will give you certainly
> useful answers depending on it's very own nature... a temporary object not.
>
> or : a horse is a horse is a horse of course
>
>
Unless it's the famous Mr Ed...
More information about the Digitalmars-d
mailing list