[TeX's] implementation is purely procedural; no
modules, no
abstractions, no objects and no attempt to create interfaces that
hide details. TeX's implementation is *all* details all the time.
Is it?
It is possible to write spaghetti code in any language. It is also
possible to write clean, abstracted, even object-oriented code in any
language.
In each case, some languages make it easier than others. Web does not
offer much help for abstractions, objects, interfaces, etc - but if
anyone is capable of creating clean code in the absence of language
assist, it would be Donald Knuth.
I haven't studied the implementation enough to know whether there is
any kind of abstraction or interfacing or whatnot going on there. I've
done those things myself in C - which offers slightly more language
assist for them, but I haven't always used it - but, even when I have,
it isn't always obvious to someone reading the code but not going to
the trouble to really understand it. So, unless someone who has
thoroughly grokked the code says so, I see no particular reason to
think TeX doesn't have that sort of clean design lurking in the
implementation.
Of course, that may have happened. But I don't see reason to think so
in what you wrote.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse at
rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B