Re: Reviving SRFI-33 Aubrey Jaffer 09 Jan 2004 03:28 UTC
| X-Originating-IP: [220.127.116.11] | Old-Return-Path: <email@example.com> | Date: Fri, 19 Dec 2003 11:02:27 -0800 (PST) | From: bear <firstname.lastname@example.org> | Cc: email@example.com, firstname.lastname@example.org, | email@example.com, firstname.lastname@example.org | Resent-From: email@example.com | X-Mailing-List: <firstname.lastname@example.org> archive/latest/25 | X-Loop: email@example.com | Resent-Sender: firstname.lastname@example.org | | | | On Fri, 19 Dec 2003, Paulo Jorge de Oliveira Cantante de Matos wrote: | | I think that numbers and strings of bits are sufficiently different | ideas, and that the differences between them are sufficiently important, | that I'd support the idea of bitstrings as a separate disjoint type, | with its own read syntax and everything. So I'd go for something like | | (bitwise-and \1001 \0110) => \1111 | | Alternatively, you could regard bitstrings as a kind of vector and | read/write them using vector syntax. In that case you'd have | | (bitwise-and #(1 0 0 1) #(0 1 1 0) ) => #(1 1 1 1) | | which is how common lisp does it. Common-Lisp bit vectors read and write as #* followed by 0s and 1s. (bit-and #*1001 #*0110) => #*0000 | But Common Lisp has typed-vector infrastructure we don't. SRFI-47 provides typed-arrays, of which typed-vectors are the rank-1 case. | And suddenly, typed vectors bring us back to the current SRFI-47. | Should au1 be added to the set of vector types for SRFI-47, with | bitwise-operations and bitstring<->integer conversions defined on | bit arrays in a following SRFI? SRFI-47 already supports bit-vectors with type AT1. There is no useful distinction between bits as 0 and 1 versus bits as #T and #F because there is only one 2-element group.