For Programmers: Free Programming Magazines  


Home > Archive > Smalltalk > May 2005 > Re: Is [variable] not object?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Is [variable] not object?
Reinout Heeck

2005-05-25, 3:59 pm

ChanHong Kim wrote:
>
> I'm writing the Dolphin Smalltalk tutorial in Korean.So I'll explain
> [variables] in philosopical method.
>
> In Smalltalk, "Everything is Object", however, variable is not.
> I can't send any message variable itself. The message sent to the
> object which is bind that variable.
>
> How can I explain such situation? Please tell me good idea about
> explain the concept of Smalltalk's variables.
>



Perhaps describe variables as collections of slots?
Instance vars are slots in an object,
Global vars are slots in a dictionary object,
temp vars are ad-hoc slots you can request by writing their names between
two vertical bars.

Since slots are part of an object they are not objects.


R
-

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com