On Mon, Jul 09, 2001 at 01:37:36PM -0400, Sam Tregar wrote:
> On Mon, 9 Jul 2001, ivan wrote:
>
> > http://www.ora.com/news/vhll_1299.html
>
> Fascinating article, but his point about XML source code struck my funny
> bone. I've certainly heard the argument before - most recently in Dr.
> Dobbs Software Development insert.
Don't laugh. It's here now. It's called XSLT. :-)
> I've got just one question: if this is such a good idea why don't the
> proponents just go ahead and start doing it? All it requires is a simple
> source filter and if XML is all it's cracked up to be that should be
> pretty easy to write.
The only benefit I can find to XSLT using XML as a programming language
syntax is that it's a natural fit for intermingling XML output with
XSLT constructs (<xsl:for-each>, <xsl:if>, etc.).
For average programs, it sucks eggs. I don't want to *THINK* about doing
the 8-queens problem with XSLT, although it's possible. It's not because
of the scheme-like behavior; it's because of the needless verbosity for
programming-style tasks (vs. format translation tasks).
Some problems still exist: runaway strings are still there, as are
unterminated statements. Except now, it's with XML syntax, so you're
talking about closing tags that aren't open, or prematurely closing a
tag (because you forgot an end tag somewhere). Completely different
class of syntax errors, and a lot of cognative dissonance for those
who are used to more conventional programming languages. :-|
> The answer: the lack of comfortable XML editors and the pain of editing
> XML by hand would make programming in an XML source format less fun than
> it seems.
Straw man argument. You don't need a "comfortable XML editor" to
do XSLT; lack of "comfortable XML editors" are not hindering the
adoption of XSLT.
Z.