Here's a question that Chris and I have whiled away the odd lunchtime
over. Given that POPLOG has got a 2-bit tag on each full-cell but
only uses three of the tag, what should the 4th tag be used for?
My favourite two suggestions are as follows. (1) The 4th tag code should
be used to denote other "simple" quantities such as characters (UNICODE)
and enumerated types constructed by the user. (2) The 4th tag code
should be used to denote "delayed" expressions. These are arbitrary
expressions that get "forced" on demand but otherwise are not executed.
The garbage collector would be sensitive to them and elide references
to them if they have been evaluated.
I especially like suggestion (2) -- even though it has a small performance
cost. If there are delayed expressions floating around, it is necessary
for all recognisers to check for that 4th tag code. This is probably
acceptable, but it is a cost. But then again, just imagine having the
ability to write lazy programs rather than just dynamic lists!
Any other suggestions?
Steve
|