[PD-dev] Re: [PD] VASP future

Mathieu Bouchard matju at sympatico.ca
Sat Mar 26 09:57:47 CET 2005


On Thu, 24 Mar 2005, Krzysztof Czaja wrote:

> > A "local" symbol-table would belong to an abstraction instance (and so, in
> > OOP vocabulary, would rather be called instance symbol-table, or object
> > symbol-table). It would be destroyed whenever the abstraction instance is
> > destroyed.
> so what would [s globalsymbol] do upon receiving $0-hello?

It would not receive $0-hello because that's an A_DOLLSYM atom, which
never leaves a messagebox or objectbox. Is that right?

However the way A_DOLLSYM works will have to be changed, because there's
no way to make a t_word hold more than either t_int or t_symbol*, whereas
now we need to have both. The solution is to use the high-bits of t_atom's
t_atomtype a_type, to store the $-prefix (which is usually 0 but is also 
often 1 and sometimes more).

In short:

  an A_SYMBOL is independent of scope. "foo" in N instances is the same
  "foo".

  an A_DOLLSYM is dependent of scope, and its evaluation causes a lookup
    for the given symbol in the table indicated by the $-prefix.

_____________________________________________________________________
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju






More information about the Pd-dev mailing list