Ask the Expert

The merits of XML-based programming languages, such as Water

Sean, I was confused by your answer to my first question. Here was your response:
"Yes, I have looked at Water. There are numerous languages that take this approach. I personally do not like the approach, but then again I'm spoiled (a Python programmer). :-)"
I haven't seen any other languages treat XML as a first-class citizen for both code and data. There are certainly hybrid designed such as JSP and ASP, but those are not XML-based languages. Water is simpler, more flexible, and more OO than Python. Can you describe what you believe Water's approach is, what other languages have "taken this approach", and specifically what you don't like about that approach?

    Requires Free Membership to View

I'm not a fan of using a tag language to express imperative programming language constructs. XSLT for example (in is imperative components) rapidly becomes unreadable and unmaintainable in my opinion. O:XML (http://www.o-xml.org/) is another example of the tag based approach. All XML adds to any tag-based approach (O:XML, water, JSP, ASP, CFML etc.) is that the tags are balanced. It does not impact, except in a negative way, IMO, on the readability (and thus maintainability) of the code.

There comes a point where you need a syntax designed for expressing programming language constructs. If you take a data description language like XML and use it to create a programming language, the result is every bit as unsatisfactory as taking a programming language and using it as a data description language.

The distinction between the two can be substantially blurred. Perhaps the best example being the Lisp family of languages in which S-expressions are at once data representation *and* code representation devices. I'm a fan of Lispy languages and functional programming languages in general. I find with Lisp that after a short while using it intensively, you "see past" the parenthesis to what is going on underneath. I have never been able to "see past" the tags in an XML-based programming language.

If you want to use a single syntax for code and data - use Lisp. It nailed the problem in about 1950. XML has nothing to offer here in my opinion.

This was first published in August 2003

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: