This voluntary cooperative model of OO gives the screaming horrors to Smalltalkers and other purists, but it leaves a lot of space for us to work in.
Most versions of Smalltalk do not actually have any notions of public/private/protected in the way Java/C++ does. Instead Smalltalk's notion of private methods is very similar to perl's, "If you weren't invited, don't come in". Smalltalk has things called method categories, which in the language are really are nothing more than syntactic sugar, but when you combine it with the Smalltalk environment, in particular the Smalltalk code browser, you have another layer of organization between the class-level and method-level. Typically Smalltalk programmers will put all their private methods into the "Private" category. Some Smalltalk implementations will complain (the equivalent of warn) when you call a method that is prefixed with an _ from outside of your class, but none (at least that I know of) will actually enforce this and not let you compile your code. Here is a link that goes into more detail if you are intetested.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|