TAKAHASHI Masayoshi wrote: > msergeant / star.net.uk (Matt Sergeant) wrote: >> > In addition, creating objects need cost. Yes, this cost is >> > not so expensive, and Ruby usually pays many many cost :-) >> >> Well I guess I'd like to see this benchmarked. > > I made rough test XML::SAX2 with REXML and XMLParser. > Creating object API version seems to be about 10% slower than > not-creating object (java-like) API version. > > It's too slow? or it's reasonable cost to make API simple and clean? I didn't do this in REXML because I didn't see the benefit of encapsulating the data in this case. The objects have no behavior, and I didn't see that it led to a more clean or simple API. -- |.. "Never judge a man till you have walked a mile in his shoes, 'cuz by <|> then, he's a mile away, you've got his shoes, and you can say /|\ whatever the hell you want to." /| --- Jack Handy |