Need feedback on simple idea
aspitz at student.math.uwaterloo.ca
Fri Apr 11 22:18:48 UTC 2003
Stephane Ducasse wrote:
> Have you look at the implemtation because I suspect that self-message
> would imply
> method lookup while the other (no self) would imply no lookup (like
> Java private).
I haven't looked at the implementation. I'm pretty sure Ruby's "private"
is always doing lookup, though; it's not like Java's "private". Here's
class PrintingPerson < Person
p = PrintingPerson.new
p.printName # works fine
print(p.name) # raises an exception
Does that answer your question?
More information about the Squeak-dev