Re: Awaken, discussion! Taylor Campbell 13 Sep 2003 16:38 UTC

     OK, if no one will comment anything about the draft, then I shall,
and
hope that it may spark up a little discussion.

     I added experimentally a VECTOR-INSERT! and a VECTOR-DELETE!, but I
currently do not like their design.
     On the matter of VECTOR-INSERT!, I'm specifically considering
something
like VECTOR-INSERT-{LEFT,RIGHT}!, though they would be confusing, given
the
differing meanings of *-INSERT-{LEFT,RIGHT}! of SRFI 44.  Also, it
would be
rather ambiguous what each one did: would VECTOR-INSERT-LEFT! insert
something on the left of the vector and then rotate stuff right, or vice
versa?
     VECTOR-DELETE! I also don't like, partially because it, too, shifts
right, like VECTOR-INSERT!.  A better design might be
VECTOR-DELETE-{LEFT,RIGHT}! (though I'd still like a better name), where
the former would remove a value and shift some of the vector left and
the
latter would shift some of the vector right.

     An orthogonal idea might be to be able to {insert,delete} stuff from
one vector into another, like with VECTOR-COPY!, but rotate elements as
well.

     A further orthogonal idea might be to have more general versions of
VECTOR-{INSERT,DELETE}!, letting you write
VECTOR-{INSERT,DELETE}-{LEFT,RIGHT}! trivially, and also any variation
thereof.

     What are your thoughts about these?