[nem-en] [Accessor] & mutable

Michal Moskal michal.moskal at gmail.com
Tue Aug 1 08:34:12 CEST 2006


On 7/31/06, Sebastian Sylvan <sylvan at student.chalmers.se> wrote:
> > It seems to be illogical because if you need a setter you have to
> > indicate it twice: WantSetter and mutable, or other way around.
> >
>
> No. You're not indicating it twice. The first time you're saying you
> want a mutable variable, which is *not* the same as saying you want it
> to be settable by the client, the second time you're saying you want
> it to be settable.
>
> In my opinion hidden should be default. If you really want something
> to have a getter *and* a setter you should have to say so rather
> explicitly.

Yeah, I also think, that this automatic want-setter would be a bad
idea. However the "WantSetter" is quite long (which kind of defeats
the purpouse of this macro, which is to save a few keystrokes). Maybe:
[Accessor(get,set)] or something...

-- 
   Michał


More information about the devel-en mailing list