<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Object Mentor Blog: The Hidiocy of XML Languages</title>
    <link>http://blog.objectmentor.com/articles/2007/05/17/the-hidiocy-of-xml-languages</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>The Hidiocy of XML Languages</title>
      <description>&lt;p&gt;I&amp;#8217;ve been reading up on some of the newer aspects of &lt;span class="caps"&gt;SOA&lt;/span&gt;, and came across &lt;span class="caps"&gt;BPEL&lt;/span&gt;.  It&amp;#8217;s &lt;em&gt;another&lt;/em&gt; language you are supposed to write in &lt;span class="caps"&gt;XML&lt;/span&gt;.  Get ready for a rant.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve had it.  What is the matter with these people?  How, after all the experience we&amp;#8217;ve had with &lt;span class="caps"&gt;XSLT&lt;/span&gt;, Ant, &lt;span class="caps"&gt;WSDL&lt;/span&gt;, etc., etc., could they create &lt;span class="caps"&gt;YET ANOTHER XML&lt;/span&gt; language.  Are they dolts?  Are they idiots?  What gives.&lt;/p&gt;


	&lt;p&gt;Look, writing in &lt;span class="caps"&gt;XML&lt;/span&gt; is hideous.  It&amp;#8217;s wordy, it&amp;#8217;s error-prone, it&amp;#8217;s arcane, it&amp;#8217;s redundant, it&amp;#8217;s redundant, it&amp;#8217;s redundant, it&amp;#8217;s&amp;#8230; &lt;span class="caps"&gt;HIDEOUS&lt;/span&gt;!  To make matters worse, we have been embedding &lt;span class="caps"&gt;OTHER&lt;/span&gt; languages &lt;span class="caps"&gt;INSIDE&lt;/span&gt; this horrible container.  &lt;span class="caps"&gt;EGAD&lt;/span&gt;!  &lt;span class="caps"&gt;YIKES&lt;/span&gt;!  &lt;span class="caps"&gt;ZOUNDS&lt;/span&gt;!  &lt;span class="caps"&gt;FORSOOTH&lt;/span&gt;!  This is just plain nuts, stupid, idiotic, retarded, poo-poo-headed, silliness!&lt;/p&gt;


	&lt;p&gt;Haven&amp;#8217;t these people heard of &lt;em&gt;economy of expression&lt;/em&gt;?  Haven&amp;#8217;t they heard of &lt;span class="caps"&gt;YACC&lt;/span&gt;?  Don&amp;#8217;t they know that domain specific languages &lt;span class="caps"&gt;SHOULD BE LANGUAGES&lt;/span&gt;?  Don&amp;#8217;t they know that languages have specific &lt;span class="caps"&gt;GRAMMARS&lt;/span&gt;?&lt;/p&gt;


	&lt;p&gt;Besides, have they ever tried to write an interpreter or compiler that uses &lt;span class="caps"&gt;XML&lt;/span&gt; as it&amp;#8217;s source?  It&amp;#8217;s not any easier than writing a &lt;span class="caps"&gt;YACC&lt;/span&gt; parser!  Indeed, it&amp;#8217;s a lot, lot, harder.&lt;/p&gt;


	&lt;p&gt;&lt;span class="caps"&gt;EMBEDDING THE GRAMMAR OF YOUR DSL IN XML IS&lt;/span&gt; &lt;strong&gt;&lt;span class="caps"&gt;STUPID&lt;/span&gt;&lt;/strong&gt;!!!  
&lt;strong&gt;&lt;span class="caps"&gt;DON&lt;/span&gt;&amp;#8217;T &lt;span class="caps"&gt;DO IT&lt;/span&gt;!!!!!&lt;img src="@" alt="" /&gt;&lt;code&gt;#$#&lt;/code&gt;$!&lt;img src="@#%" alt="" /&gt;!!&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;&lt;em&gt;I hereby declare a revolt.&lt;/em&gt;&lt;/strong&gt;  From now on anyone who considers themselves to be a serious professional must refuse to write another line of &lt;span class="caps"&gt;XML&lt;/span&gt;.  When asked, say NO.  Instead, write a little &lt;span class="caps"&gt;YACC&lt;/span&gt; grammar that is nice, and small, and translates into that hideous &lt;span class="caps"&gt;XML&lt;/span&gt;.  You&amp;#8217;ll save yourself &lt;span class="caps"&gt;GOBS&lt;/span&gt; of time if you do!  What&amp;#8217;s more, if you sell your parser for $5 per download, you&amp;#8217;ll probably be able to buy a new boat!  Maybe a fleet!&lt;/p&gt;</description>
      <pubDate>Thu, 17 May 2007 22:01:22 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:7caa6edd-f657-402d-a766-d2abdb8dffa7</guid>
      <author>Uncle Bob</author>
      <link>http://blog.objectmentor.com/articles/2007/05/17/the-hidiocy-of-xml-languages</link>
      <category>Uncle Bob's Blatherings</category>
    </item>
    <item>
      <title>"The Hidiocy of XML Languages" by Tim</title>
      <description>&lt;p&gt;Uncle Bob: thank you. Please keep saying this loudly and often&lt;/p&gt;</description>
      <pubDate>Fri, 01 Aug 2008 13:46:31 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:46df3f6a-cec6-4584-84c6-75295b203c21</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/17/the-hidiocy-of-xml-languages#comment-1923</link>
    </item>
    <item>
      <title>"The Hidiocy of XML Languages" by Terence Parr</title>
      <description>&lt;p&gt;Hi. You might enjoy my article called &lt;a href="http://www.ibm.com/developerworks/xml/library/x-sbxml.html" rel="nofollow"&gt;Humans should not have to grok XML&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Regards,&lt;br&gt;
Terence&lt;/p&gt;</description>
      <pubDate>Fri, 22 Jun 2007 03:56:54 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:88797030-dc14-4fbc-9b41-e307a0c1f9b6</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/17/the-hidiocy-of-xml-languages#comment-452</link>
    </item>
    <item>
      <title>"The Hidiocy of XML Languages" by Andy Glew</title>
      <description>&lt;p&gt;Yes, humans should never write directly in XML.&lt;/p&gt;


	&lt;p&gt;However, I agree with DAR: the advantage of XML is that standardized tools can manipulate it. I&amp;#8217;ve written a lot of program analysis tools that have had to deal with the idiosyncrasies of C/C+, Perl, etc. &amp;#8211; tools that are examining programs written in those languages. Or, rather, I&amp;#8217;ve created klugey and fragile hacks &amp;#8211; because it is pretty damned hard to find parsers for C/C+, or Perl, if you are not actually in a compiler team.&lt;/p&gt;


	&lt;p&gt;Consider SWIG, the interface and wrapper generator: it has to parse your C/C++ code. Started in 1996, even after 10 years it does not handle all of C++.&lt;/p&gt;


	&lt;p&gt;Obviously a compiler has to parse the language it is compiling. Tools like SWIG need to, as well. Obviously there should be a library that encapsulates the parsing, that can be shared between such tools, to avoid people having to write the parser again and again and again in different ways.&lt;/p&gt;


	&lt;p&gt;The best effort I have seen in this is GCC/XML.  Its C/C++ parser is moe likely able to parse the whole language because it is the GCC parser.  Unfortunately, it is forked and back versioned &amp;#8211; so it does not support language features whose support was fixed or extended in later versions of GCC.&lt;/p&gt;


	&lt;p&gt;But anyway, my points are:&lt;/p&gt;


	&lt;p&gt;a) Parsing languages like C/C++ and Perl is hard.&lt;/p&gt;


	&lt;p&gt;b) Some tools need to do so.&lt;/p&gt;


	&lt;p&gt;c) If these languages can be translated to XML, it makes such tools easier.&lt;/p&gt;


	&lt;p&gt;OK, so that only means that I want a text-to-xml translator for languages such as C/C++.&lt;/p&gt;


	&lt;p&gt;But I can forsee the day when the language itself is defined in terms of XML.   Humans would not write the XML, only tools and editors would&amp;#8230;&lt;/p&gt;


	&lt;p&gt;Not only would such languages be easier to write tools for.&lt;/p&gt;


	&lt;p&gt;But such languages would also be easier to extend.  E.g. consider that C and C++ diverged, in large part because many legal C programs are illegal C++ programs because C++ defined keywords that were legal C variable names.  And nw the same thing is happening again, as C++ tries to add new keywords such as atomic, that used to be legal identifier names.&lt;/p&gt;


	&lt;p&gt;Any language that has a small set of keywords that would otherwise be legal identifiers is hard to extend.&lt;/p&gt;


	&lt;p&gt;Or, consider, C++ templates: which do you prefer, saying &amp;#8220;typename Traits::int_type&amp;#8221;  all over the place? If you write lots of template could, it gets well nigh unreadable.  But if it were  &amp;#8211; well, that is even more unreadable.  But if your IDE hides the XML stuff, and just says &amp;#8220;Traits::int_type&amp;#8221; in some nice font and color?&lt;/p&gt;


	&lt;p&gt;XML languages suck.&lt;/p&gt;


	&lt;p&gt;But I expect there will be a new genheration of languages that do not look like XML, but which use underlying XML to distinguish keywords, types identifiers &amp;#8211; to indicate language elements.&lt;/p&gt;


	&lt;p&gt;And I look forward to the program comprehension tools that such languages will facilitate.&lt;/p&gt;


	&lt;p&gt;In the meantime, I am looking for better tools such as GCC/XML.&lt;/p&gt;</description>
      <pubDate>Sat, 16 Jun 2007 01:25:15 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:187a5d88-6e40-4c35-8991-39979548ee8a</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/17/the-hidiocy-of-xml-languages#comment-438</link>
    </item>
    <item>
      <title>"The Hidiocy of XML Languages" by DAR</title>
      <description>&lt;p&gt;Ummm &amp;#8230; has it ever occurred to anyone that there&amp;#8217;s actually good reasons for writing file formats and protocols using XML??&lt;/p&gt;


	&lt;p&gt;First off, yes XML-based files/protocol streams need to be readable by humans, but only incidentally so.  They&amp;#8217;re primarily for communication between computers.  Yes, occasionally people need to read them for debugging purposes and such, but that&amp;#8217;s a secondary need.  Given that, if the format is reasonably readable (i.e., text-based), that really is sufficient.&lt;/p&gt;


	&lt;p&gt;Secondly &amp;#8211; and most importantly &amp;#8211; the single, paramount, important reason why people base new things on XML is so that they can take advantage of standard tools to read/write these things.  Why on earth should someone have to painstakingly craft a new grammar file from scratch (including minute details like what characters are allowable and where, how escaping will work, etc.) every time they need to create a new file format or protocol??  It makes zero sense.  (Or, as you would put it, &amp;#8220;This is just plain nuts, stupid, idiotic, retarded, poo-poo-headed, silliness!&amp;#8221;)  Surely leading members of the agile community can see the benefit of NOT REINVENTING THE WHEEL &amp;#8230; several different times &amp;#8230; on every project??!?&lt;/p&gt;


	&lt;p&gt;Third, you&amp;#8217;re completely overlooking one incredibly important benefit of XML:  XSLT.  XML-based formats gain the huge benefit of having a preexisting analysis and transformation language available for it &amp;#8211; completely for free!  Want to analyze or filter your file or protocol stream?  Easy!  Just whip up a quick XSL file to do so.  Want to transform your file or protocol stream into any other file format on earth?  Again, piece of cake.&lt;/p&gt;


	&lt;p&gt;Helllllllooooooo wheel reinventors!  Please paste this on your screen:  &amp;#8220;XML has a lot of benefits and will save me lots of time.  It is not evil!&amp;#8221;&lt;/p&gt;</description>
      <pubDate>Wed, 06 Jun 2007 13:52:24 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:9fa502b4-c97f-4ab4-862f-99d39223457c</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/17/the-hidiocy-of-xml-languages#comment-393</link>
    </item>
    <item>
      <title>"The Hidiocy of XML Languages" by Andrei Pamula</title>
      <description>&lt;p&gt;... or define a DSL in ruby, making use of &lt;strong&gt;real objects&lt;/strong&gt;, make it  user-friendly (ruby already is pretty :D). Now you can use &lt;strong&gt;any&lt;/strong&gt;
ruby editor in order to write specifications in your DSL.&lt;/p&gt;


	&lt;p&gt;Did I mention that you can now &lt;strong&gt;unit-test&lt;/strong&gt; your DSL?&lt;/p&gt;</description>
      <pubDate>Fri, 01 Jun 2007 08:52:48 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:16bcec93-6230-45c4-8f63-83a1412b3735</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/17/the-hidiocy-of-xml-languages#comment-286</link>
    </item>
    <item>
      <title>"The Hidiocy of XML Languages" by Bill de hOra</title>
      <description>&lt;p&gt;At the top of your page:&lt;/p&gt;


	&lt;p&gt;html xmlns=&amp;#8221;&lt;a href="http://www.w3.org/1999/xhtml" rel="nofollow"&gt;http://www.w3.org/1999/xhtml&lt;/a&gt;&amp;#8221;&lt;/p&gt;


	&lt;p&gt;So yes; please stop writing in XML.&lt;/p&gt;</description>
      <pubDate>Thu, 31 May 2007 21:16:39 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:0b8f8683-2929-4f41-b1b3-586f2a44edbb</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/17/the-hidiocy-of-xml-languages#comment-281</link>
    </item>
    <item>
      <title>"The Hidiocy of XML Languages" by Debasish Ghosh</title>
      <description>&lt;p&gt;How about s-exp instead of XML as program and data. I had blogged about this some time back (&lt;a href="http://debasishg.blogspot.com/2007/05/xml-not-for-human-consumption.html" rel="nofollow"&gt;http://debasishg.blogspot.com/2007/05/xml-not-for-human-consumption.html&lt;/a&gt;).&lt;/p&gt;</description>
      <pubDate>Wed, 30 May 2007 23:25:39 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:8beff7fe-f9d5-44c3-866a-d78dfc0815d1</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/17/the-hidiocy-of-xml-languages#comment-273</link>
    </item>
    <item>
      <title>"The Hidiocy of XML Languages" by Dean Wampler</title>
      <description>&lt;p&gt;I have this nutty idea that &amp;#8220;scripting languages&amp;#8221;, like Groovy, Ruby, etc. will largely supplant XML for everything non-trivial. So, you might still use XML for data, but you&amp;#8217;ll use a mini-DSL in Ruby to express your business processes, &lt;i&gt;etc.&lt;/i&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 28 May 2007 23:59:41 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:e7476ac0-bf3f-4ed2-a184-ef5f24f101a1</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/17/the-hidiocy-of-xml-languages#comment-265</link>
    </item>
    <item>
      <title>"The Hidiocy of XML Languages" by Bob Corrick</title>
      <description>&lt;p&gt;found your new home via Brad Appleton -&amp;gt; butunclebob&lt;/p&gt;


	&lt;p&gt;I wholeheartedly agree. Just ordered a book on ANTLR, to dip my toe in that water.&lt;/p&gt;


	&lt;p&gt;regards
Bob Corrick
Developer&lt;/p&gt;</description>
      <pubDate>Thu, 24 May 2007 05:55:53 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:4edb605c-2bf8-40ff-872b-e1e2b899703f</guid>
      <link>http://blog.objectmentor.com/articles/2007/05/17/the-hidiocy-of-xml-languages#comment-208</link>
    </item>
  </channel>
</rss>
