[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Scheme-reports] Blobs vs. byte vectors (was: 6.4 control features ...)
[Copying WG1 list]
Andy Wingo scripsit:
> Less polemically: consistency has a value, but for me it stops well
> before the useless "blob-map".
My original view of blobs was as something that didn't have a native
structure, but was just raw binary data. That's why I proposed the
name "blob" rather than "byte/octet vector", which would imply a native
structure of octets. In my view, blobs could be seen as octets, but
equally well as 32-bit words in network (big-endian) order, or double
complex numbers, or UTF-8 strings. All these interpretations are equal
For WG1 purposes, though, I thought it was necessary to select just one
way of accessing them, and the u8 way was the obvious one, as all the
others could (if not very efficiently) be built on top of it using only
portable Scheme. That made blobs more like byte vectors, and *as* byte
vectors they deserve to have the same basic functions as general vectors
or character vectors (strings). If vector-map is useful (and I think
it is), then byte-vector-map is just as useful for people whose vectors
meet the necessary criterion. For blobs in full generality, though,
blob-map would make no sense because there was no unique element type
for it to map over.
So somehow the mental model issue has to be resolved, after which these
details will just fall out naturally. If blobs are really u8 vectors
and everything else is just an overlay, then blob-map, blob-for-each,
etc. make sense. If all views of blobs are cognitively equal (which
is how I really think), then they don't, and the restriction to a u8
setter/getter is just to keep WG1 small.
John Cowan cowan@x http://www.ccil.org/~cowan
C'est la` pourtant que se livre le sens du dire, de ce que, s'y conjuguant
le nyania qui bruit des sexes en compagnie, il supplee a ce qu'entre eux,
de rapport nyait pas. --Jacques Lacan, "L'Etourdit"
Scheme-reports mailing list