Re: The beauty of LATEX
Daniel James <[email protected]>
| Newsgroups | gmane.comp.lib.boost.documentation |
|---|---|
| Message-ID | <CAHOE3ydK6Z16U-iSKdX8KC-EtBZurSadMwOUxerr0SK1vNWYcQ@mail.gmail.com> |
On 21 October 2011 21:23, Dave Abrahams <[email protected]> wrote: > > on Fri Oct 21 2011, Daniel James <dnljms-AT-gmail.com> wrote: > >> That might be extended to say 'A programming language in a markup >> language is nonsense'. The problem is that in most languages things >> are symbols by default, in a markup language things are text by >> default, so using one as a programming language requires nearly >> everything to be annotated as 'not text' which becomes verbose. > > I don't think that's really the problem. We have lots of examples of > programming languages in markup languages that work out pretty well, for > example, PHP and LaTeX. They're certainly not nonsense. 'Nonsense' was Joel's word, I don't think XSL is nonsense. As I said, "it's great for some XML transformations". On the right occasion it can even be elegant but on the wrong occasion.... Maybe icky would have been a more appropriate word. Of course my argument only applies to languages where things are text by default and you have to explicitly mark that things are not text. So for a markup language that isn't of that form, it doesn't apply, although it might be icky for some other reason. The point is that the syntactic noise of having to keep saying 'this is a variable', 'this is a command' ruins the flow of the language. You can get away with a little of that (e.g. dollars for variables are disliked by some but aren't really problematic), but not that much. I'm not sure if TeX falls under that category, it's such a weird language I've never understood what it is. I just don't have the patience to learn how to program in it. It seems to more of a macro language. As far as I can tell there's a general consensus that it's not a nice programming language at all, maybe even icky. The php programming language isn't based on a markup language, it's a curly bracket programming language that you escape into, so clearly my argument doesn't apply there. Although ickiness abounds for other reasons. Of course all of this is subjective, that's always the problem with syntax design. >>> If you want the simplest usable embedded programming language, that would >>> be scheme, or a dialect. >> >> Well technically, it's probably be a Forth style language. > > ! Please, no. I love Forth for its ingenious simplicity, > but... <shiver> Exactly.