> Mhmm, in TeX you have basically the same limitations. > Both groff and TeX languages are not well suited to such > operations. Recently, TeX has been extended with a lua > interpreter: luaTeX; this seems to be the future, since > complete support for OpenType has been already implemented.
Interesting. But I wonder: apart from backwards compatibility, wouldn't it make more sense to reimplement the basic routines of the typesetter in the chosen language instead of tacking an interpreter onto the typesetting engine to expose internals that were never designed to be accessed externally? > > I got a reply from Tadziu Hoffman who gave me an idea of > > making a real stack, > > As I mentioned in a previous mail, this works fine for > arguments without spaces only. And I doubt the string-based stack is any more "real" than the "constructed-variable" version. It only appears pretty because the implementation is short, which hides the inherent inefficiency of repeatedly having to rescan the string to divide it into separate elements and then to glue them all together again. (My design stems from an experiment to see how far I could come using only 2-character names, thus the idea of storing everything inside a single string.)