> 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.

Hm. I'd argue that's apples and oranges, but the main idea is that Ruby users would not *have* to know C to use Ruby features that
are (ultimately) written in C.

>
> 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.

And write Ruby in Ruby?

<snip />
> 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.

There has been an interesting thread on xml-dev about who is using DOM or SAX, and whether people are making the best choice.  While
the majority of XML developers may use a tree, this may be simply because they are unfamiliar with event-based programming.

Now, I don't know that Ruby should include something simple because it's what potential users might be most familiar with, if that
something isn't what's best for the job.  It's somewhat like an argument for including a W3C DOM object: sure, some people, maybe
many people, would find it familiar, but it's ugly and hardly the best API for XML-in-Ruby, so leave it out.
(I.e., why encourage bad habits).

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

Why?

>
> > 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.

Close enough :)


James

>
> :-)
>
> --- SER