Squeak vs. privacy

David Mitchell david.mitchell at gmail.com
Tue Oct 16 13:36:19 UTC 2007


>         My next question, then, is couldn't this be as simple (from the user's
> perspective) as placing methods in specific categories, for example:
> strict private (for self only); private (for class and maybe sibling
> access); protected (for ancestors)? Maybe that's too complicated, dunno.

Try creating some categories for your own code. Then extend the
SmallLint tools to give you feedback on usage.

I'm personally very opposed to method access control (just from bad
personal experience in Java). I've always found that calling a method
that is in a private category from outside the object is enough of a
code smell for me. No exceptions necessary.


>
>         My gut feeling is that there's tremendous potential benefit to this; that
> greater encapsulation might help with the rot. But certainly Smalltalk is
> old enough have had something like this done before, so maybe I'm mmissing
> something.
>
>         ===Blake===
>
>



More information about the Squeak-dev mailing list