... I think you re misunderstanding XML. XML is was not supposed to be a programming language, but rather a data representation (markup) language. Lisp and XMLMessage 1 of 4 , May 30, 2004View SourceOn Fri, May 28, 2004, Omer Zak wrote about "[hackers-il] Why XML caught on where LISP and Scheme failed to?":
> As I read "Extensible Programming for the 21st Century"I think you're misunderstanding XML. XML is was not supposed to be a
> (URL:http://pyre.third-bit.com/~gvwilson/xmlprog.html), I pondered the
> secret of success of XML. In a way, I am already using XML software
> (glade, the GUI editing tool, saves the edited GUI description in a XML
> file, which can later be read by a Python library and used to construct
> the GUI for a script).
> After all, it can be considered to be just another syntactic
> representation of LISP or Scheme. For example, the transformation between
> (+ 1 2)
> <token name="+"/>
> <token name="1"/>
> <token name="2"/>
> is trivial.
programming language, but rather a data representation (markup) language.
Lisp and XML are only related by the fact that both use "0" and "1" bits ;)
I remember that 6-7 years ago or so, at work, I had to invent a file format
for saving large sets of result coming from a certain program. The format had
to be relatively simple to read or write and machine-independant (so ASCII
was a benefit) and extentible (i.e., the reading program could look at
certain sections written by a newer writer, and know that it doesn't recognize
these sections and simply skip them, with no error). XML was exactly right
for this job, but at that time XML was not very popular, so I chose not to
use it and invented my own format that basically looked like a (possibly
<section_name> <type> <length>
Which corresponds to the XML
Nowadays, unfortunately, XML is so hyped that I hear of people using XML
for things that even a simple tab-separated format would do.
In any case, as these data formats do not contain any executable instructions,
loops, and so on, using lisp would not make much sense. Surely, for hand-
edited input files the power of a programming language (having things like
conditionals and loops) can come in handy, but these aren't essential for
machine-generated data files, which are what most XML files are nowadays.
You might want to compare Postscript and PDF - the former was a full
programming language used as a printed page input format, and it was later
replaced by a more simplistic, not-a-language, format.
Nadav Har'El | Sunday, May 30 2004, 10 Sivan 5764
Phone +972-523-790466, ICQ 13349191 |A messy desk is a sign of a messy mind.
http://nadav.harel.org.il |An empty desk is a sign of an empty mind.
... Obligatory disclaimer: I know Lisp pretty well, but my understanding of XML is rudimentary. You ve been warned. Well, from the Lisp (shall I say, abstractMessage 2 of 4 , May 30, 2004View Source"Nadav Har'El" <nyh@...> writes:
> On Fri, May 28, 2004, Omer Zak wrote about "[hackers-il] Why XMLObligatory disclaimer: I know Lisp pretty well, but my understanding
> caught on where LISP and Scheme failed to?":
> > As I read "Extensible Programming for the 21st Century"
> > (URL:http://pyre.third-bit.com/~gvwilson/xmlprog.html), I pondered the
> > secret of success of XML.
> I think you're misunderstanding XML. XML is was not supposed to be a
> programming language, but rather a data representation (markup) language.
> Lisp and XML are only related by the fact that both use "0" and "1" bits ;)
of XML is rudimentary. You've been warned.
Well, from the Lisp (shall I say, abstract CS?) point of view there is
no difference between program and data. If you have a lisp-like
interpreter for Omer's (or similar) XML representation you can write
code. For all intents and purposes it will be Lisp. I don't think that
anyone here will argue that the actual tokens matter.
On the other hand, representing structured data in Lisp is also
possible and frequently done. I did it myself a few times, including
writing custom tools to "lispify" and "delispify" independently
I seriously doubt though that there is a "secret" to XML's success on
the technical level. It's not the first or the last markup
language. It's not the first or the last extensible language. I would
guess ("assert without proof," borrowing an expression from Wilson)
that big business support + some familiarity of syntax to those who
had been using HTML "forever" (on the Internet timescale) were the key
factors. I also suspect that XML is successful as a structured data
representation, with custom tools written in every programming
language known to mankind, including, significantly, Lisp. Since
anybody can write their own tools one can live with structured data
representation and a small (a.k.a. limited) tool, and without a
full-blown Lisp interpreter (but maybe a JVM :).
Of course, there is Greenspun's 10th Rule of Programming:
"Any sufficiently complicated <insert your favourite language here -
OG> program contains an ad hoc informally-specified bug-ridden slow
implementation of half of Common Lisp."
All the rest is likely to be religious wars. ;-)
 One can argue that XML tags afford you some additional capabilities
w.r.t. error checking, since the closing tag echoes the type of the
opening one. Any decent editor will match parentheses in Lisp code
though, making such checking very easy.
 IMH(umble)O the same is true, to a significant extent, for Java.
 The original said, "C or Fortran" - OG ;-).
Oleg Goldshmidt | pub@...