From: Chad Fowler Date: 2003-10-03T00:17:49+09:00 Subject: Re: xml in Ruby On Thu, 2 Oct 2003, paul vudmaska wrote: # Basically it is an attempt to roll xml as a native # type into ecmascript. I'd suggest Ruby could benefit # and set itself apart by doing so. Following is my own # quick and dirty Ruby'd version of the above.(you might # want to check it out first) # Pretty much everything you've mentioned here is possible with REXML already. The only thing I can see that isn't possible is the built-in XML syntax. I can't see how hard-wiring XML as a part of Ruby's syntax provides much of a benefit at all. It would be fashionable (though not really all that fashionable these days), but barring that it's just more baggage to carry around. # There's plenty of room for rolling more # organic/programic/rubylike approaches to style than # xsl into Ruby(particulary considering Ruby's iters and # blocks). I'm not sure this is the wisest approach, and # think people like Michael Kay(an xsl guru) might point # out the folly of this. And keeping to a standard would # be good for a product such as Ruby but it sure is # intersting...at least to me. # Interesting in the same way that Lojban is interesting (http://www.lojban.org). :) # So now we've # 1) done what javascript might be doing but totally # trumped them with (ruby)style. # 2) added a feature that python and perl can only wish # for Are we playing sports or writing programming languages? I didn't know it was a competition. Who are the enemies? Is anyone on our team? # 3) created an internal common data structure that is # similar to the array, hash and struct but is sometimes # better and certainly more portable/readable. more readable? blahblah2lkjsdf vs. ["blah", "blah2", "lkjsdf"] # 4) now a native type, we can import/export data to # whatever speaks xml without worrying about # implementation. With REXML in the distribution you can already do this. Just requires a few more keystrokes. # 5) have an inherent mechanism for seperating duties # within code- ie data from style But you've now joined a data representation format to a language. Where would you rather have coupling? # Whatcha think? Can i count on this by 1.8.1? ;-> # No offense intended, but I hope not :)