tags:

views:

154

answers:

7

I think that html is the easiest thing to learn when you are starting to learn about web, scripting and programming. I know that html is not like real programming languages, but that's not the point of the discussion. So, wouldn't it be nice if people could script their programs in a html way, like XML?

I've searched on google for a while but i've only found a few examples like the "o:XML Programming Language" and "Superx++", but they seems to be so much theoretical.

Do you know any XML based programming language? Do you think that's a good idea to teach these languages or start to working in them? Do you know any tool that could help in the creation of the interpreter for these languages, like a XML parser?

+1  A: 

Well ColdFusion is alot like XML/HTML/SGML markup... very tag based. MXML is also a tag based language and is used in conjunction with ActionScript - but i compiles to Flash (.swf)

prodigitalson
+2  A: 

That XML is easy to write does not mean that it can be used to easily program in. The closest that I could see would be a programming tool that happens to use XML as a representation of the program.

Ignacio Vazquez-Abrams
+6  A: 

XSLT is an XML based transform language, but I can't say it's very fun or easy to use.

MXAML and XAML are declarative markup commonly used for creating UI hierarchies.

I would suggest taking the time to learn another language (python perhaps?), I doubt you will ever look back.

tarn
both mxml and xaml are for data presentation, i'm searching for a xml PROGRAMMING language... and python rules
Gabriel
@Gabriel: he gave you one, XSLT.
musicfreak
XSLT, as gross as it is, is a functional functional programming language (and no, that's not a typo).
Ignacio Vazquez-Abrams
@Gabriel How about lisp. Just replace the parentheses with angle brackets.
tarn
+1  A: 

XML and the like are designed to express hierarchical data in a (relatively) succinct fashion. XML is okay at this, and enjoys great success.

However, most programs don't lend themselves to being expressed hierarchically. Because of this, they can't easily be expressed in XML or any similar syntax. How would you express a recursive function in XML? Wait, bad example. How would you express a reporting engine in XML?

Modern languages are more verbose because we require them to be, and the ultimate goal of any production language - that is, anything that's not a freakin' science project or grad student application - is to get things done, fast. As engineers, we are fortunate to experience the disruption where the rubber meets the road, and see what works vs what sounds cool. XML-based programming languages sound neat, but, for the most part, are inadequate. (For those that would argue: provide an XML overview of an Apollo 11 simulator, and we'll talk).

David Lively
+3  A: 

I don't quite see the advantage. Either something is a descriptive language (a.k.a. markup language) or it's a "real programming language", which usually means it has features like variables, if...else and some form of loops. XSLT is sort of in the middle but is still more descriptive than anything else. If you want to learn "real programming", I don't see the advantage of typing more code in some specialized XML syntax over any other traditional syntax.

Learning the concepts of programming is what you should be interested in, the language is just a means to express those concepts. Whether you type (hypothetically)

<xml:loop var="x" start-value="0" condition="<10" post="x++">
    ....
</xml:loop>

or

for (var x; x < 10; x++) {
    ....
}

really doesn't make that much of a difference. Actually, I prefer the shorter syntax.

deceze
A: 

I remember some hullabaloo about Water a while back. Personally, an XML-based programming language seems like a nightmare to me.

Boojum
A: 

The world is full of XSLT haters, but I'm not one of them. It's one of the most useful technologies I've learned in the last decade.

It's also got a very limited scope; while, as Michael Kay demonstrated in his XSLT Programmer's Reference, it's possible to implement a knight's-tour algorithm in XSLT, there's no practical reason for doing so.

Robert Rossney