For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > October 2007 > Re: TeX pestilence









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: TeX pestilence
David Kastrup

2007-10-26, 7:07 pm

Brian Blackmore <blb8@po.cwru.edu> writes:

> In comp.text.tex David Kastrup <dak@gnu.org> wrote:
>
>
> But if I compare these things to what I actually said in my post (which
> I will now reinsert), namely regarding the problem that I see in CS
> students these days...
>
>
>
> I find that you're quite making my point for me. That TeX is foul
> or difficult is, to a newbie, often a matter of trying to do the
> wrong things, in my experience.


And the wrong things with TeX is usually trying to program it in the
first place.

> The delineation between stomach and mouth is intrinsic to using the
> system and a requirement as one moves forward with TeX programming.
> I can think of no greater example of having to use the system
> "according to the documentation" and to approach "the problem in the
> correct way".


But the "correct way" sucks or is non-existent. The first task in the
appendix "Dirty Tricks" from the TeXbook tries to define a macro
containing a variable number of asterisks. The solutions are all
complicated, most have quadratic behavior or worse, several are in
danger of exhausting TeX's limits in normal use cases, and Knuth does
not manage to come up with a single expandable solution which could be
used without breaking ligatures or kerns. So one of the most basic
programming tasks to be imagined is a "Dirty Trick" and the author of
the language does not have a solution close to satisfactory.

> This, increasingly, seems to be what younger `programmers' lack, the
> ability to be bothered with any detail, however major, and most
> especially if it's in the documentation.


Your theory would be tantamount to saying that really good bicyclists
should be trained on creaky old holland bikes because those tax the
legs hardest.

It does not work that way. The relation between investment and payoff
is so terrible that you never arrive at the point where you pick up
enough speed to actually get enough fun together to get into a
positive feedback cycle where it is fun pushing yourself.

> Then there's TeX the program itself, and from a number-of-bugs point
> of view, I think they have a lot that could be learned.


Again, I disagree. From a software engineering point of view, TeX is
an idiosyncratic one-person masterpiece. Making it do something
different makes it break all over the place in unexpected ways. Too
many shortcuts and inherent assumptions. It took a genius to create,
and it takes a genius to maintain it. That's not engineering, that's
art. And one can teach only the appreciation of great art, not its
creation. Creative genius is not created in schools or universities.
It is not a dependable resource. It is pointless to teach what can't
bear fruition without a special spark.

> If "programming TeX really sucks", I find it surprising that you're
> the expert, etcetera. It seems reasonable to me to label you as
> such --- no problem there --- but if it blows so heavily, why are
> you still doing it?


Because nobody else does.

> Would not a better argument be based on seeing you program in
> something else?


You'll find me programming in Lua when LuaTeX becomes stable enough.
Until that time, there is no reasonably available system producing
typeset text which can be reasonably programmed in a non-braindead
language. LuaTeX will be a chimera, sure. But at least it has one
sane head you can talk with.

> Yes, I've made an assumption, so I will quickly correct it. I agree
> in part simply because I'd never set out to program an OS kernel in
> TeX, nor some hardware driver, etcetera. I wonder how much of that
> can be blamed on TeX, however, versus blaming the nonexistence of
> those types of interfaces at the time it was designed. COBOL comes
> to mind.


Program something like bigfoot.dtx, or even just binhex.dtx. Those
are not hypothetical applications.

> It seems to me that if we take the arguments you've put forth, there
> are a rather large number of sucky programming languages.


I know no "programming language" (TeX is not a language but rather a
system) where it takes two completely different systems with utterly
different semantics to assign to a variable and to use its value.

> I could complain about having to worry about scope in C: "Wah, I
> can't change a variable in here because it hasn't been passed in by
> reference, but if I try to change it in here then something outside
> breaks". Or in Perl: "Wah, 'print (1+2)+4' does not print seven".
> These sorts of statements are a fundamental misunderstanding of the
> operation of the system in use and that, as far as I am concerned,
> is a statement of lack in the programmer, not the language.


Your comparisons don't make it look like you have programmed serious
tasks both in C and in TeX.

--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
UKTUG FAQ: <URL:http://www.tex.ac.uk/cgi-bin/texfaq2html>
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com