3 ms·
You fall into a simple trap: TeX is not a programming language. At all. It's a typesetting DSL. Whether it's a good one is another thing.
by Argorak 12y ago
You fall into a simple trap: TeX is not a programming language. At all. It's a typesetting DSL. Whether it's a good one is another thing.
- fosap 12y agoIt's typesetting DSL, but if you want to typeset you'd need a typesetting meta-DSL. The one thing that works fine with TeX is math, because math typesetting is build in. Typesetting something more specific other than english text and math is hard and ugly. If does follow imperative paradigms, as it does, the programming language part is essential if you want to do anything meaningful with it. If exotic task you never need in typesetting, such as multiplication, is hard to implement, something is wrong. And IMO that is why LaTeX is so odd and hackish. Context is much better, tough. And, by the way, the unfortunalty dead ANT uses a nice Haskell like language and is still a typesetting DSL. http://sourceforge.net/projects/ant.berlios/ http://sourceforge.net/projects/ant.berlios/ https://web.archive.org/web/20090310012257/http://ant.berlios.de/ https://web.archive.org/web/20090310012257/http://ant.berlio...
- wodenokoto 12y agoIf it's Turing complete, it's a programming language.
- Argorak 12y agoMagic: The Gathering is turing complete. SQL as well. Petri-Nets with certain extensions are. Many logic systems are. They are hardly programming languages.
- JadeNB 12y agoAccording to Knuth (quoted at http://tex.stackexchange.com/a/167443/1169 http://tex.stackexchange.com/a/167443/1169): Knuth: So TeX is a programming language but I had to put in those features kicking and screaming.
- Argorak 12y agoBut the quote equally shows how much it is not intended to be.
- JadeNB 12y ago> But the quote equally shows how much it is not intended to be. Yes, certainly, but you said (https://news.ycombinator.com/item?id=8615643 https://news.ycombinator.com/item?id=8615643): > TeX is not a programming language. rather than "TeX is not intended to be a programming language." It is nit-picking to be sure, but I think that, if the creator of a language (especially one who knows his stuff as Knuth does) says that it is a programming language, then it is. Another appeal to (a lesser) authority—the TeX Users Group (https://www.tug.org/whatis.html https://www.tug.org/whatis.html): In summary, TeX is a special-purpose programming language that is the centerpiece of a typesetting system that produces publication quality mathematics (and surrounding text), available to and usable by individuals. … and an appeal to the fact that people have written programs in it: http://stackoverflow.com/a/1931289 http://stackoverflow.com/a/1931289. (P.S. To "so, is XSLT a programming language because of, say, http://www.unidex.com/turing/utm.htm http://www.unidex.com/turing/utm.htm ?" I say "sure, why not?" What is the point of excluding something from being a programming language?)
- patrickg 12y agoActually LaTeX was invented to be a typesetting DSL. As someone who has taught TeX and LaTeX and written my own software on top of TeX, I have come across this question very often. Basic TeX is not meant to be high level at all. LaTeX hides the complexity of 95% of the typesetting needs.