Fri Sep 5 01:45:58 CEST 2008
remarks about pk2.ss
Can I say something intelligent about the pk2.ss implementation? It's
about primitives and composition, and hiding as much as possible
behind NAMES, exposing only a single behaviour for each... I.e. a
selector name in the device data base representing a script has the
ONLY behaviour to reproduce the script code, parameterized on the
current device. All indirection in the datastructure can be hidden
behind this one name.
3 namespaces are brought together: commands, script primitives and
scripts from the .dat file. One remaining confusing bit is that
scripts can be invoked as if they were commands without error.
2 semantics: commands and scripts.
What I fail to see is why these 2 semantics are necessary. Basicly,
the scripts are composable with something like ordinary 'call' in the
form of RUN_SCRIPT, which has an extra repeat parameter. The commands
are a flat meta-language.
Something to fix: make sure it's not possible to confuse scripts and
commands by making their return values distinct. It is convenient to
not have to manually 'execute' commands, but confusion is easy.