On Mon, Jul 04, 2005 at 12:30:47PM +0200, Taco Hoekwater wrote:
As promised, some proposals for the symbol table. No code yet, because careful thinking is needed first, to avoid unexplainable side-effects.
Let me propose two rather straightforward new primitives first (please imagine the \ptex prefix yourself):
\ifprimitive <csname>
True if the <csname> has the same meaning as it would in initex, (but gives an error if <csname> is currently undefined).
What is the result of \ifprimitive, it is \iftrue/\iffalse or an expansion text "true"/"some error message"?
\executeprimitive <csname>
What about \executeprimitive itself? \def\executeprimitive{Hello World} \executeprimitive\executeprimitive\relax Is the result two "Hello World" or "\relax"?
Executes the primitive that would be known as <csname> in initex, even if the <csname> is currently undefined or defined to mean something else. Raises an error if there is no matching internal command (of course).
These are quite straightforward, and I do not assume this needs much discussion.
I need some clarification only.
But the next ones are related to "if feature ...", and those are bit harder to define.
\ifinternal <csname> \executeinternal <csname> \exposeinternal <csname> \obscureinternal <csname>
WDYT?
It needs some thinking.
First thoughts:
* It looks like a first step to a real namespace implementation,
a (perhaps read-only) internal namespace, namespaces for extensions,
and user/package macros. Why not going further then?
* Perhaps PostScript ideas of dictionary stacks can help here:
systemdict for internal iniTeX primitives, userdict, ...
Yours sincerely
Heiko