Dannii wrote:
I've published my draft 1.2 proposal:
http://curiousdannii.github.com/if/zspec12.htmlComments, concerns etc?
This might be a bit of jumping the gun to comment on this as my first post, but I have something I want to bring up. I'm currently about 80% done implementing a Z-machine, which is about the extent of my background.
Over all the idea of this seems pretty sound, but I think that the use of a number to ID the different extension to the interpreter has the potential for trouble.
One thing I've seen in the world is that this sort of thing can cause problems really quickly, especially if they catch on. Not only do you need to officiate the 'official' selector codes you have to worry about unofficial ones. While the spec does allow for a range of private codes the odds are pretty good that any private extension will have a 50/50 chance of using $F000 instead of a random number. Collisions in this space can and will cause a problems.
So, if I might make a different suggestion. Why not try using a string. It's not much harder to do then anything numbers, it could eithor follow the same embedding rules as @print and @print_ret with the optional argument before the embedded string or be a paddr to the string. The upshot of this is you can use something like mime types or URIs to ID the extensions, which can be be descriptive and lower the chance of collisions (I would also suggest lower case string comparisons).
For example you could have things like:
Standard Version: "Standard-Version" "uri://curiousdannii.github.com/if/zspec12.html"
Transcript: "Transcript-Protocol" "uri://curiousdannii.github.com/if/transcripts.html"
Zoom: "Zoom-Profiling" "uri://www.logicalshift.co.uk/unix/zoom/Profiling"
Zoom: "Zoom-StackDump" "uri://www.logicalshift.co.uk/unix/zoom/StackDump"
Private: "X-Whatever" "url://whatever.com/"
I have some other thoughts on the interpreter number, but as that's not part of your proposal I'll wait on that.