[Push] Reserved names and active features
PerPlex Ed
edperplex at yahoo.com
Mon Jun 28 07:01:30 EDT 2010
Lee said:
>In the Common Lisp implementation of Push3 the concept of "active
instruction" is basically what you say here: symbols that name
implemented instructions are recognized as instructions and executed
whether or not they are "active," and the active status only affects
random code generation and the behavior of the code.instructions
instruction.
I modified my implementation to behave like that. It's simpler because the parser doesn't need to know about the configuration of a given interpreter but only about the set of implementation's features.
>I'm not sure this is the best way to do things.
I'm almost sure that's the way to do.
After all the configuration can change at run-time and that could make a program representation invalid. For example, in my implementation - and I'm sure in many, if not almost all, others - an instruction is not represented by a string or a symbol but it's a specific object of the underlying platform. If an instruction is deactivated at runtime, that would require the program and the code and exec stack to be updated replacing all the instances of the deactivated instruction with instances of the symbol corresponding to the instruction's name.
Same happens if you want to share the same program between multiple interpreter instances (maybe concurrent).
There are ways to fix this issue but it adds complexity.
Maybe "active" is not the right name for this concept.
Rud Merriam said:
> In short, I am thinking there isn't an issue here.
I guess the problem is subtle and depends on how you implemented and how you use the Push interpreter. In some cases this is not a relevant issue, I agree.
More information about the Push
mailing list