Method names

Michael S. Klein mklein at alumni.caltech.edu
Mon Nov 2 19:45:16 UTC 1998


> >or not "aBitStream next: 40 bits" meant ((aBitStream next: 40) bits).

First, it already says aBitStream, so the second pseudo-selector-noop-bits
is just stuttering reminicent of programming in java.  I.E.

	BitStream bitStream = BitStream.newBits(...)

Either it is unambiguous that you mean bits, in which case the second
bits pseudo-selector-part is unneeded, or there is a posible second 
semantics, let's say it could be bytes of any size, 1 to n.

The I would do:  (for a machine with a ten-bit byte size)

	aBitstream next: numberOfNotNecesarily8BitBytes byteSize: 10

and expect to get back a sequence of Integers between 0 and 1023.

-- Mike

P.S.  Somebody on the list uses Knuths quote about it being intollerable to
depend on a specific byte size.  I actually like the term Octet.  What say
we rename ByteArray to OctetArray  :-)   Nah.  8-bit Bytes are just too
entrenched.  Be carefull when you make you bed.  You may be sleeping in 
it a looooong time.





More information about the Squeak-dev mailing list