Jon wrote:
> I would like the answer to the question to be:
>
> : [a], [% hd() %] =>
> ** [a]
>
> : [a], {% hd() %} =>
> ** {a}
>
> Jon Rowe
I'd have thought that in any clean stack-based language admitting such
constructs, *both* of them should yield an error . Ideally this
should be a Stack underflow error, because hd tries to take something
off the stack which isn't there, as far as ITS context is concerned.
However, making this efficient at run time would be very difficult.
Next best, in both cases, would be having "hd" produce an error
because it is applied to a special stack-boundary marker.
Perhaps better compile time analysis by the Pop-11 compiler, causing a
compile-time error, is the answer.
Aaron
|