[r6rs-discuss] use of "bytes"

From: Marcin 'Qrczak' Kowalczyk <qrczak>
Date: Mon Nov 20 15:12:48 2006

Per Bothner <per_at_bothner.com> writes:

> But another anbiguity is whether bytes are signed or unsigned. As a
> measure of storage size (the most common one) it doesn't matter, but as
> a data type it does. Notice that "byte" in both Java and C\# is signed.
> (C# also has "unsigned byte".)

You are right about Java, but in C# byte is unsigned, sbyte is signed.

IMHO unsigned bytes are more practical and should be enough for
everybody (it's trivial to convert them when needed), although
if a function accepts a byte as an argument, there is no harm
in accepting -128..-1 too.

As for "byte" vs. "octet", I feel that almost everyone calls them
bytes in practice, except things like Internet standards, and that
today each byte has 8 bits.

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak_at_knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/
Received on Mon Nov 20 2006 - 15:12:23 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC