Alexander Burger wrote:
> Hi Cle,

Hi Alex,

back from shopping outside, I read your explanations. Let me thank you.
Although I have read the reference manual several times (and have it
open while I am coding) I did oversee 'push' and 'queue' totally :-( But
I know about 'inc' but for my learning purposes, I did it more
complicate on purpose here ... however, thanks anyway you for trying to
improve my skills :-)

> On Thu, Dec 10, 2009 at 08:32:38AM +0100, Alexander Burger wrote:
>> oops, didn't look carefully enough. The 'foos>' method must, as in
>> your *1c* case, specify the current '*Class' directly:
>> (dm foos> () (mapcar cdr (val (get '`*Class 'Foos))) )
> Now I begin to grasp your intention. "Hard coding" the class into a
> method is not nice. So wouldn't simply

I second your reason, it is not nice, but ...

> (dm foos> () (mapcar cdr (val (: Foos))) )
> do what you want?

Howevery only if the receiver is the class. If I use an instance as
receiver, it would not work! I would like to code the method the way,
that the method will work regardless if the receiver is a class or one
of its instances; like it works in Smalltalk, C++, Java, Ruby ...

So is there a possibility to trick with e.g. 'with' or 'var:' access the
value regardsless of the receiver?

Thank you for your effort to explain me the mechanisms so far ... :-)



Reply via email to