[nem-en] [Accessor] & mutable

Sebastian Sylvan sylvan at student.chalmers.se
Tue Aug 1 03:42:22 CEST 2006


On 7/31/06, Igor Tkachev <it at rsdn.ru> wrote:
> Hello Piotr,
>
> >> integration. I just started coding in N and found this feature... lets
> >> say, a little bit illogical.
>
> > Illogical? Why? I think it is better to have safe default.
> > Exposing read-only interface is the safe choice. And more functional
> > one ;)
>
> 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.

/S

-- 
Sebastian Sylvan
+46(0)736-818655
UIN: 44640862



More information about the devel-en mailing list