Need feedback on simple idea

Stephane Ducasse ducasse at iam.unibe.ch
Fri Apr 11 20:44:55 UTC 2003


This is an interesting information (meaning different that good idea 
still interesting fact).

> The Ruby language allows "self" to be left out when it's the receiver
> (just as Java and Self do). Ruby also has a simple privacy mechanism:
> you can mark a method as being private, and private methods can only be
> accessed by messages sent using the "implicit self" syntax. (Is that
> right? My Ruby is rusty.)

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).


We played with another related idea which was simply not working : to 
have self message and no-self-message having different semantics 
regardings private and public methods and the net result was bad 
because moving code between different location was forcing you to 
change non-self to self and vice versa if I remember right. So we 
killed the idea.

Stef


Prof. Dr. Stéphane DUCASSE
http://www.iam.unibe.ch/~ducasse/
  "if you knew today was your last day on earth, what would you do 
different? ...  especially if,
  by doing something different, today might not be your last day on 
earth" Calvin&Hobbes

"The best way to predict the future is to invent it..." Alan Kay.

Open Source Smalltalks: http://www.squeak.org, 
http://www.gnu.org/software/smalltalk/smalltalk.html
Free books for Universities at 
http://www.esug.org/sponsoring/promotionProgram.html
Free Online Book at 
http://www.iam.unibe.ch/~ducasse/WebPages/FreeBooks.html



More information about the Squeak-dev mailing list