Michael Lenaghan scripsit: > we'd be talking about introducing one:
> (define-vector-type <name> <type>) And are pairs going to be vectors of length 2 and type Object? If not, why not? > [Y]ou can still make strings and u8 vectors part of the standard, > just as "let" is part of the standard and derived from "lambda". Okay. In that case, what is the point of primitive typed vectors? General vectors can do everything that primitive typed vectors can do by virtue of their expressiveness, and if you want effective specialized vectors, they have to be done using implementation hacks anyhow. > define-vector-type would actually make it easier to gracefully expand > the set of pre-defined vector types in Thing Two. The point of doing so > would be to a) agree on names and b) allow naive compilers to continue > to cheat on those pre-defined types with those pre-defined names. I don't see why Schemes want vectors of arbitrary fixed type. They save neither space nor time. > Yes, but that's like saying we don't need fixnums because we already > have bignums. If you define things in terms of general vectors you > give up space and time efficiency--and you close the door to getting > it back. Unless, of course, I misunderstood what you mean by "tower"; > to me that implies an is-a? hierarchy which isn't present with the > disjoint types I'm suggesting. I am not saying blobs are *defined* in terms of general vectors, not at all. I am saying that on systems with no native blobs, general vectors can be used to (crudely, but correctly) *emulate* blobs. Once you have blobs, SRFI-4 vectors are easy. > Again, making growable vectors part of the standard raises the level > of abstraction available to an implementation. Not at all. It's far from clear that implementations can do growable vectors better than a Scheme programmer can with existing powers of procedural abstraction and syntactic abstraction, plus the new (but very widely implemented) power of datatype abstraction with SRFI 9. -- John Cowan [email protected] http://ccil.org/~cowan [R]eversing the apostolic precept to be all things to all men, I usually [before Darwin] defended the tenability of the received doctrines, when I had to do with the [evolution]ists; and stood up for the possibility of [evolution] among the orthodox --thereby, no doubt, increasing an already current, but quite undeserved, reputation for needless combativeness. --T. H. Huxley _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
