But you can define class side methods (often as convenient
abbreviations) for creating new instances, which "hide" the call to new
within their implementation, your fileIn above is one such example.
It's implementation might very well look like:
fileIn: aPath
^self new fileIn: aPath
Just guessing, but it's a common pattern.
Yes, in this case it's another common usage of class methods, i.e.
"create an object, do something, discard it". fileIn: is implemented as
^(self open: aPath mode: self read)
fileIn;
close
(more or less).
Paolo
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk