From: Chad Fowler Date: 2003-10-03T02:09:26+09:00 Subject: Re: xml in Ruby or no xml it's just a question On Fri, 3 Oct 2003, paul vudmaska wrote: # >>-------- # "Chad Fowler" # Pretty much everything you've mentioned here is # possible with REXML # --------------------<< # Except the style. Besides, that was part of my point. # Well, when you say "style" I think you mainly mean syntax, right? Other than XML being first-class syntax, the rest of the style you've proposed is do-able (and reflected quite well in Erik's posted code). # >>-------- # "Chad Fowler" # 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. # ---------<< # It's interesting to me that you would wrap an xml # file(rss) in an object # http://www.chadfowler.com/ruby/rss/ # but belittle an offhanded attempt to make inherent # those attributes that you so painstakingly crafted # code for and call the former more baggage. Help me # understand that, Chad! # First of all, you could hardly call the process of creating that simple library painstaking. The fact that I wrapped RSS parsing in an object demonstrates (though rather poorly considering the age of this code--see Austin Ziegler's replacement on SourceForge) my belief that things like this should be abstracted into *libraries* and not the language. Someone else has created a CSV library. We could include CSV as a native data type too. How about URIs? We have uri.rb, but why shouldn't we be able to simply say: myURI = http://www.ruby-lang.org How about JPEG files? With the right graphical programming environment, you could actually embed pictures into code. myVar = . myPic.vertical_flip. # # >>-------- # "Chad Fowler" # # Interesting in the same way that Lojban is interesting # # (http://www.lojban.org). :) # --------------------<< # for you! # Don't you find Lojban interesting? # # >>-------- # "Chad Fowler" # # 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? # --------------------<< # # I'm just a simple scriptor making an open ended # suggestion about a language that i enjoy in a forum # that i would hope would encourage such things - even # if they are stupid. What language are you writing, # btw? Just an analogy, maybe a bad one. Sorry. # "We" as in the community, of course. And the language would be ruby. I certainly wasn't implying that I'm personally creating Ruby, but that's pretty obvious. I was serious about the question I asked, though. Why the competition? # # # >>-------- # "Erik Terpstra" # Last year I made a quick hack that could do something # like that. # I didn't have much experience with Ruby back then, so # it is a quick and # very dirty solution. But the following works: # ----------> # Erik demonstrated the same point I was trying to make, but he had some working code :)