Hi --

On Thu, 31 Oct 2002, William Djaja Tjokroaminata wrote:

> dblack / candle.superlink.net wrote:
>
> > Aren't there cases where that might change, if the implementation changes?
> > It seems that () is serving as a comment, potentially a fragile one.
>
> Hi David,
>
> I agree with you that () has the potential of serving as an incorrect
> comment.  However, unlike other types of comments, in my opinion the
> consequence of this type of incorrect comment is almost negligible.
>
> (Probably one exception is if, like in my other post, because of the
> special convention, a person who sees "obj.stuff" will assume the
> existence of "@stuff" when he derives a class from the class of "obj".)

I don't think one should make that assumption; it's awfully rigid.  I
might have:

  def stuff=(x)
    @thing = x
  end

  def stuff
    @thing
  end

which is a dinky example at best... but meaning there is no necessary
connection between the methods and the implementation.


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav