XML-Conformant Programming Languages

Joshua E. Smith jesmith at kaon.com
Wed May 5 14:51:24 BST 1999


{I am *very* pleased with the intellectual quality of discussions on this
group!}

To summarize this thread:

Everyone thinks I'm nuts.  That's fine.  I'm used to that.  I usually take
that as a sign I'm going in the right direction. ;)

Yes, XML doesn't do me any good helping me parse or interpret the programs
the user has written.  Many of you don't seem to get this: I *already* have
a working scripting language written (your classic "little language").
That means I can already get from declarations to moving the program
counter around.  So I don't *need* XML to help me parse (except, I don't
have anything like &entity substitution, so that will be a nice benefit I
get for free on the processing end).

I know that folks like you *and me* write all our HTML, XML, Perl, Java,
etc. in Emacs.  On Linux.

However, you cannot release a product to Jane Q. Public (even for free)
which uses a "little language" and tell her she needs to write her programs
in Notepad.  She needs a tool to make organizing the constructs of the
language easy.  (They call this "Visual Programming" and it's actually
pretty cool when it's done right -- which is almost never, because people
keep trying to put visual wrappers around glorified machine languages like
Java.)

However, I'm sure you can relate, the *last* thing I want to do is write a
custom editor.  I can't stand to use them, much less write one.

XML *can* solve this problem for me.  I'll be able to tell Jane to just
fire up Homesite, or Office 2000, or whatever, and it'll know how to edit
programs in my language.

This is a REALLY BIG step forward, folks.  You know how you can get a funky
set of .el files which makes emacs know how to edit every language you work
in?  Well imagine folks in the rest of the world being able to fiddle with
their web pages and all the stuff which integrates into their web pages
(maybe including database front-ends, too) in a common environment.  XML
could make that possible.  You and I will never use it, but trust me, this
could be huge!

<preach> Oh, and some of you have a pretty jaded view of programming
languages.  Do yourself a favor and go learn LISP and FORTH.  You'll see
that very useful programming languages don't have to be an unholy mess like
C, Java, Perl, and VB.  Check the back issues of Dr. Dobbs for a good
article on FICL, for example. </preach>

<retort> Yes, YACC is a LALR parser, but what you *almost always* do in the
production rules is stuff $1, $2, and $3 into a parse tree which you munch
on the back end.  Most multi-CPU targeting compilers use a parse _tree_ as
the internal representation of the program (the original MIPS compiler
actually saved it out to disk).  Writing an ALGOL derivative language in
XML basically gets rid of the need for a language specific parser, and
makes the programmer responsible for parsing the language herself.  While
that would be a nightmare in C (as one of you showed quite clearly), it is
no big deal in LISP, FORTH, and hundreds of other well designed languages.
</retort>

-Joshua Smith


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list