>Alain: Is this an incontrovertible principle or merely
>a limitation of our current approach? Your answer is
>very important to me because I am in the process of
>inventing an agent-based architecture where SEND is
>used very very frequently.

Alain,

 the current form of "send" in HC, and most forms of "do" aren't
compilable. If you write

 do "play boing"

a compiler could recognize it's a string constant and compile it
beforehand, but as soon as you use string-concatenation like

 do "global" && varName

varName could contain anything, even several lines etc. and thus it is
impossible to compile it in advance. But there are ways to leverage
limitations somewhat. E.g. to trigger a handler in another object, Serf has:

 send type "A" to cd btn 5

Notice there are no quotes around the 'type "A"' message. This form of send
is limited to sending messages (no commands etc.) and thus Serf can parse
this beforehand. The first token is the name of the handler to call, and
after that is a list of parameters. It's like an out-of-line handler call,
which is why it works.

 We could do similar things e.g. when people need to declare variables
whose name they need to generate at runtime, e.g. by adding a qualifier
"variable" and then allowing:

 put 5 into variable varName

This way, the "put 5 into ..." part can already compiled, and the compiler
merely has to locate the appropriate variable to assign it to. This is not
as fast as actually knowing which variable to put into, but it's a lot
faster than having to interpret every time.

Cheers,
-- M. Uli Kusterer

------------------------------------------------------------
             http://www.weblayout.com/witness
       'The Witnesses of TeachText are everywhere...'

--- HELP SAVE HYPERCARD: ---
Details at: http://www.hyperactivesw.com/SaveHC.html
Sign: http://www.giguere.uqam.ca/petition/hcpetition.html

Reply via email to