[self-interest] Re: KNOW TYPES

Douglas Atique datique at zaz.com.br
Tue Sep 7 15:55:18 UTC 1999


Hello, Maryah.
As far as I know, a slot can't have a type. A slot is just a structure
referenced by an object that references another object. After studying the
VM implementation, I am convinced that everything is an object in Self.
Even strings and numbers. As such, Self encourages you to use polymorphism
instead of type information to implement the intended behavior. For
example, if you need to know the type of a slot because you want to act
conditionally on it, you are on the wrong way. What you need is to embed
this behavior in each kind of object you may have so that you don't have to
know its "type", but the object will do the right thing when you ask it to.
Of course, in Self a slot has a "type", which is a different concept: a
slot can be a data slot, a method slot, a parent slot, an argument slot
(did I miss something?)...
Please anyone correct me if there are alternatives!
Regards,
Douglas

maria wrote:

>                 Hello everybody:
>
>                 I have a new question for you:
>                   Does Self  has got any menssage or intruction  to know
> the type ( integer, char...) of an slot in run-time?
>
>                please answer my question as soon as posible and thank
> you for yuor help.
>
>                                             Maryah.
>
> ------------------------------------------------------------------------
> MyPoints-Free Rewards When You're Online.
> Start with up to 150 Points for joining!
> http://clickhere.egroups.com/click/805
>
> eGroups.com home: http://www.egroups.com/group/self-interest
> http://www.egroups.com - Simplifying group communications




More information about the Self-interest mailing list