| Ilya Zakharevich on Fri, 25 Oct 2002 23:06:30 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: gp: Vecsmall("abc") suggestion |
On Wed, Oct 23, 2002 at 07:39:33PM +0200, Karim BELABAS wrote:
> On Wed, 23 Oct 2002, Michael Somos wrote:
> > I have a little suggestion. Since 'Vecsmall()' and 'Vec()' behaves :
> >
> > ? Vecsmall("abc")
> > *** incorrect type in vectosmall.
> > ? Vec("abc")
> > %1 = ["a", "b", "c"]
> >
> > Why not extend the behavior of 'Vecsmall()' as follows :
> >
> > ? Vecsmall("abc")
> > %2 = Vecsmall([97, 98, 99])
> >
> > The code needed is already part of 'Vec()' and just needs to be slightly
> > adjusted to prevent changing each character into a t_STR.
>
> OK. Done in CVS.
I do not think this is a proper thing to do. As far as I'm concerned,
t_VEC and t_VECSMALL should differ only by the speed of execution.
Moreover, what happens when one wants to process UTF-8 strings?
I think this behaviour should better be governed by a flag.
Ilya