From: Tom Sawyer Date: 2002-08-10T04:13:33+09:00 Subject: Re: ambiguity between local variable assignment and writter method On Fri, 2002-08-09 at 13:01, GOTO Kentaro wrote: > But what will I get from: puts .setter = 123 good question > Well, I know that this probrem is considered one of pit hole. But > this syntax may lead implicitly us to a style: Use @var rather than > var() even if that is a simple attribute. Indeed I prefer @var or > @var=val bacause the semantics of theml are simpler and clearer then > #var() or #var=(val). unfortunately, this is actually bad form. if a class instance variable is set up to be accessed via accessor methods, they should be used at all times. even internally. while, it is functionally equal for the simplist case, writter methods may do other things as well, like validate the argument. -- ~transami