Hi, Bradley Lucier <[EMAIL PROTECTED]> writes:
> If, instead of bytevectors, R6RS had homogenous vectors as in SRFI 4, > this could be inferred from the text of the program. However, SRFI-4 vectors are not handy for binary I/O, precisely because they are homogeneous. FWIW, I recently implemented ONC RPC and XDR using the bytevector API and found it very convenient. The interesting thing is that either type can be implemented in terms of the other. Implementing SRFI-4 on top of bytevectors raises aliasing issues. Implementing bytevectors on top of SRFI-4 vectors may be inefficient (except for accesses of the type of the underlying SRFI-4 vector) because the representation conversion code would need to operate on regular (boxed) numbers (e.g., assuming a u8vector is used, `bytevector-u32-ref' needs to fetch 4 numbers, and then perform the appropriate arithmetic and bitwise operations). Maybe that's a sign that both abstractions are useful on their own? Thanks, Ludovic. _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
