James Britt (rubydev) wrote:

> Why is C code more difficult to maintain? Isn't Ruby itself written in C?

You can assume everybody working with Ruby knows Ruby.  You can't assume 
that everybody working with Ruby knows C.

One of the reasons we use Ruby is because Ruby is easier that C; ergo, C is 
more difficult.  Ergo, it is more difficult to maintain.

Yes, Ruby is written in C, but this is one of those neccessary evils.  If 
we had a Ruby -> Native compiler, I'd wager we'd drop the C dependancy ASAP.

> code?  Do we need to *control* expat to use it?

Arguably, yes.  You'll notice that Ruby doesn't use the Perl regexp code, 
or the GNU regexp library.

>> XMLParser isn't much faster than the native Ruby XML parsers, except in
>> Stream parsing, and it is much slower in many other common XML tree
>> operations.  I don't see any reason to take on the burden of maintaining
....
> "isn't much fater" is still faster, and I would see using expat for tree
> operations, mainly for stream processing.

I can see the desire to have fast stream procsessing.  However, I'm arguing 
from my own personal perspective: almost all of the XML usage I've 
encountered has been tree processing.  I added stream processing to REXML 
only as an afterthought. I'd rather have fast tree processing than fast 
stream processing, so I'd rather have NQXML or REXML than XMLParser, 
because the former are faster.

I'd also rather not see two different XML processors bundled with Ruby, for 
obvious reasons.

> events at obvious times, such as the start or end of an element, but to
> *not* call these events 'startElement' or 'endElement' (i.e., to avoid
> following the 'common law' SAX API) seems perverse.

To use an API that doesn't use the standard Ruby naming mechanism (ie 
startElement rather than start_element) seems perverse.

:-)

--- SER


-----=  Posted via Newsfeeds.Com, Uncensored Usenet News  =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
 Check out our new Unlimited Server. No Download or Time Limits!
-----==  Over 80,000 Newsgroups - 19 Different Servers!  ==-----