>
>
> Andy> I noticed that the Seaside tutorial has code such as:
> Andy> html div class: 'menu';  with: self menuComponent.
>
> Andy> Whereas the Scriptaculous demo code does things like this:
>
> Andy> html paragraph id: 'position'; with: position.
>
>
> Andy> I.e. they didn't bother adding (or using) a getter for position.  Who
> is
> Andy> right, or doesn't it matter, or is there another reason why it would
> be
> Andy> written differently?
>
> Clearly, position is an instance var, or perhaps a temporary.  An instance
> var
> may or may not have accessors, depending on whether it is meant to be
> tweaked
> from the outside.  #menuComponent, on the other hand, may be just an
> accessor,
> or it may be a whole pile of code to generate that menu on the fly.  At
> this
> point, it doesn't matter.
>
> Whether internal accesses to instance vars should use accessors instead of
> direct access is a subject to debate (read: religious war).  I hope you
> haven't accidentally triggered that thread here.  I tend to do the simplest
> thing that works, and leave it at that.
>

Great, I am all in favour of pragmatism.  Thanks.
_______________________________________________
Beginners mailing list
[email protected]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to