← Back to context

Comment by svat

8 years ago

To the contrary, TeX (not LaTeX) has one of the best error-handling and error-recovery interfaces of any commandline program — if you use TeX as Knuth intended, that is, if you use plain TeX at the commandline and if you have read the entertaining chapters in The TeXbook on dealing with errors. Just try using plain TeX (not LaTeX) for a few months and you'll find that the behaviour when errors happen is one of its delights, the opposite experience from when you use LaTeX. (Of course, you may miss many conveniences from LaTeX, but the error experience is itself almost worth the change.)

Knuth has done a great job that should be the model for all other software writers: every error is described in two ways, one somewhat formal and one somewhat informal, and every error is shown with enough context (and this is configurable too) for you to quickly see what the issue is, and you can even fix errors without having to abort the compilation. He has a great talk where he describes how the English language is optimized for dialogue (things like "I" and "you") and TeX messages are designed in that way.

Unfortunately, LaTeX consists of several layers of complicated macros (all in the name of making things convenient for, and hiding things from, the user) and as they (correctly) decide that all these layers won't make sense to the user, they actually turn off all the context that goes with the error, leading to error messages that are incomprehensible even to experts. But I don't think it's right to blame the fact that LaTeX didn't bother to implement good error-recovery on TeX.

> He has a great talk where he describes how the English language is optimized for dialogue (things like "I" and "you") and TeX messages are designed in that way.

Is this online? I listen to everything I can from Knuth but haven't heard this one.

  • I have seen it written down in print somewhere more eloquently (probably one of his interviews or conversations); the thing I was referring to (incorrectly) was not an entire talk of its own, but a passing brief remark (a few seconds or a minute) during one of the “Internal Details of TeX82” lectures about the source code of the TeX program (https://www.youtube.com/watch?v=bbqY1mTwrj8&list=PL94E35692E...). Sorry I don't have a more exact reference right now.