visibility" of class object in favour of a global context

Stephane Ducasse ducasse at iam.unibe.ch
Fri May 23 13:47:53 UTC 2003


Hi andreas and Avi


On Friday, May 23, 2003, at 12:41 AM, Avi Bryant wrote:

>> BTW, I am very seriously considering doing exactly that - get rid of 
>> the
>> "visibility" of class object in favour of a global context.

Can you explain? I do not understand but I'm intrigued.

Stef

>
> What you're describing sounds somewhat similar to what Ruby does - 
> IIRC,
> there's a Kernel mixin whose methods are available from any object, but
> which are also available in the global scope.  So if you have a script
> like
>
> #!/usr/bin/ruby
> 10.times do
>   |i|
>   puts i
> end
>
> then "puts" is actually a call to Kernel#puts (and "self" in this 
> context
> would resolve to some instance of Kernel).



More information about the Squeak-dev mailing list