Caleb Clausen
10/7/2006 4:48:00 PM
On 10/6/06, Hal Fulton <hal9000@hypermetrics.com> wrote:
> Sounds interesting... is it better than Eric M's Cursor
> class? Different in some significant way?
Well, Sequence is faster than Cursor for most things. I haven't
benchmarked, but (eg) #read should be at least 10-100x faster. (Except
when reading from a file, which Cursor optimizes fairly well, if I
remember.)
I think that the support for #scan and friends (from StringScanner) is
better in Sequence. Eric will disagree with me on this.
Cursor doesn't have an equivalent to my Sequence::Subseq.
Cursor::Linked more or less corresponds to my Sequence::List (except
that I never properly understood Cursor::Linked -- how to use it, how
it works).
Those are the biggest differences. The sequence api has otherwise
about the same capabilities as its ancestor. I've moved everything
around to suit my way of thinking, tho, so it isn't compatible (except
for doing very simple things).