vectors of homogeneous elements vs strings? | dima@xxxxxx | 13 Feb 1999 17:02 UTC |

Re: vectors of homogeneous elements vs strings? | Marc Feeley | 15 Feb 1999 20:43 UTC |

Re: vectors of homogeneous elements vs strings? | Dima Pasechnik | 16 Feb 1999 00:05 UTC |

Re: vectors of homogeneous elements vs strings?

*Marc Feeley*15 Feb 1999 20:43 UTC> It seems to me that the proposal as it is does not go far enough. > > Would it be more natural to have a "vector of homogeneous elements > tagged with the common type" (something one would maybe call an "array") > > and consider the types f32, f64, u*, s* mentioned in the proposal as > elements > of the corresponding vectors to be an extesnion of the Scheme numerical > types? > > In fact, Scheme has one such "array" type, namely "string". I'm not sure which of the following you are suggesting: 1) that the proposal be generalized to cover multidimensional vectors, such as #f32((1.0 2.0) (3.0 4.0) (5.0 6.0)). 2) that the proposal be generalized to choose the type of element (array of characters, array of booleans, array of strings, etc). 3) that the arithmetic functions be generalized to accept multidimensional vector of numbers (with the zero dimension case being a normal number), so that (* 2 '#f32(1.0 2.0 3.0)) => #f32(2.0 4.0 6.0). Which (combination) of these do you mean? I'm not sure such features would be good, but even if you convince me that they are good I think it would be a mistake to lump all of this in a single SRFI. I prefer SRFI-4 to be something that many implementors are willing to implement in their system, and some other SRFI can build on top of SRFI-4 to provide more functionality. Marc