While we're lynching features, how bout' them omittable parens?

Leandro Lucarella llucax at gmail.com
Tue May 19 10:54:59 PDT 2009


Jarrett Billingsley, el 19 de mayo a las 11:31 me escribiste:
> On Tue, May 19, 2009 at 10:12 AM, Leandro Lucarella <llucax at gmail.com> wrote:
> > Steven Schveighoffer, el 19 de mayo a las 09:54 me escribiste:
> >> >So for me, properties are way more than just syntax sugar.
> >>
> >> AFAIK, this is not enforced by the compiler...
> >>
> >> I write C# properties that have side effects.
> >
> > Well, in D2 it would make sense to make mandatory that properties are pure
> > =)
> 
> How the hell do you write a pure setter?

Ok, "almost pure" =P

You should be able to modify "this", of course.

BTW, I'm not convinced about it yet, it just looked like something to
think about. There is definitely a side of having a contract that
a property can't do nasty things that I like, but I'm not convinced that
it worth the lost in flexibility. For example, I like ORMs in Python that
makes black magic behind the scene to get stuff lazily from the DB.

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------



More information about the Digitalmars-d mailing list