Wednesday, December 18, 2002

Jorgen Thelin responded to a post by James Strachan about X# where James questioned the value of an XML programming language, saying "After all, XML is just a text encoding format". Jorgen's point is that XML Schema includes typing features not easily mapped to traditional OO languages, citing derivation by restriction and substitution groups. I'd add simple type facets to that list (for example, it's not convenient to define a String class that accepts [A-Z]{2} as its legal value range), but in any case, what caught my eye is that Jorgen called out 2 features of XML Schema that I'd decided last week might not be worth the trouble. Looking at the arguments against Substitution groups, it sounds like the argument is that it's difficult to handle substitutions in code, which sounds like exactly Jorgen's point. Looking at the arguments against restriction, the most damning seems to me to be the clunky XML Schema syntax for declaring derivation by restriction, although the caveat that "Most bugs in [XML Schema] implementations cluster around this feature[derivation by Restriction]" doesn't inspire confidence either.

I suppose my real objection to XML-based programming languages is that the syntax is flat-out ugly. I suppose that doesn't matter much if the code's generated, but if I'm typing it, I still want something readable. While I enjoy working with XSLT, I do get frustrated with the amount of excess typing involved, though a good editor helps. I think the appeal of XSLT is in the processing model, not the syntax. Still, I'm finding myself on James' side, XML is a good format for machines but not so great for humans. So I think that a language to support XML processing might be a good thing, but a programming language using XML as the syntax doesn't sound too exciting.

3:32:19 PM  permalink Click here to send an email to the editor of this weblog. 


Stories
DateTitle
1/23/2003 Why XML?
8/13/2002 Resolution for IE and Windows problems
8/10/2002 Supporting VS.NET and NAnt
5/11/2002 When do you stop unit testing?
Contact
jabber: weakliem
YM: gweakliem
MSN: gweakliem@pcisys.net
email: Click here to send an email to the editor of this weblog.
Subscribe to "Gordon Weakliem's Weblog" in Radio UserLand.
Click to see the XML version of this web page.