Leo Razoumov <firstname.lastname@example.org> wrote:
| If you recall, my original post was about resizing strings with MzScheme.
| MzScheme uses Boehm's conservative garbage collector and NOT a copying one.
| MzScheme garbage collector is pretty close to the one used in SCM. Therefore
| one should be able to do similar things with similar efficiency with both
Correct. You can probably lift the code fairly straightforwardly out of SCM.
But... That's still *NOT* a reason for "universal" adjustable strings to
be added to Scheme [the other part of your post], since it would exclude
implementations that use copying collectors (which, depending on design
and application area, can be *much* better than the Boehm-Demers one!!).
If you want to propose a SRFI, do it the way SCM did, as a *separate*
type from either Scheme vectors or Scheme strings, so that the latter
are still free to run fast with a copying collector.
Then consider whether you want to add non-copying "substring" that shares
the "raw data" part, along with automatic copy-on-mutate iff shared (IIRC
this is provided in Boehm's "cords", a sample of which is distributed with
the B-D GC). Some people think that's a big win for certain apps (e.g.,
editors), though it slows down *all* string access some, and again mandates
a non-copying GC. Classic tradeoffs...
Rob Warnock, 8L-846 email@example.com
Applied Networking http://reality.sgi.com/rpw3/
Silicon Graphics, Inc. Phone: 650-933-1673
1600 Amphitheatre Pkwy. FAX: 650-933-0511
Mountain View, CA 94043 PP-ASEL-IA