Randal, In certain situations a method (accessor or not) is an "implementation detail" ..."the smell is in the nose of the sniffer"...
Dale ----- Original Message ----- | From: "Randal L. Schwartz" <mer...@stonehenge.com> | To: "Dale Henrichs" <dhenr...@vmware.com> | Cc: Pharo-project@lists.gforge.inria.fr | Sent: Wednesday, July 27, 2011 8:35:19 AM | Subject: Re: [Pharo-project] Maybe a brain dead idea | | >>>>> "Dale" == Dale Henrichs <dhenr...@vmware.com> writes: | | Dale> | | Dale> | You should design your object's interface respecting the | needed | Dale> | protocols, not its internal design. Bad code smell | otherwise. | | Dale> If your intent is to provide for subclassing in the future (or | Dale> tomorrow), then you should use accessors exclusively. There is | a | Dale> place for such tool functionality. | | I disagree even with that. An "instance variable" is not an | interface... it's an implementation detail, even in the presence of | subclassing. The interface should be about the behavior, not the | implementation. | | -- | Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 | 777 0095 | <mer...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> | Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. | See http://methodsandmessages.posterous.com/ for Smalltalk discussion |