On Tue, Nov 28, 2000 at 03:15:35PM -0600, Jarkko Hietaniemi wrote:
> On Tue, Nov 28, 2000 at 03:34:22PM -0500, Dan Sugalski wrote:
> > At 01:25 PM 11/28/00 -0600, Jarkko Hietaniemi wrote:
> > >On Tue, Nov 28, 2000 at 07:03:49PM +0000, Tom Hughes wrote:
> > > > Applying the maxim that any software design problem can be solved
> > > > with sufficient levels of abstraction I'd suggest that passing some
> > >
> > >A related warning sign is trying to cram different semantic levels or
> > >types into same data.  (C's "string model" being perhaps the most
> > >obvious example, getchar() having to be an int is another, "0 but true"
> > >a third...I want a "1 but false" :-)
> > 
> > Which ways is that one being violated? (I can think of a couple 
> > personally... :)
> 
> Embedding the (fixed-length) length into the data.  As Nicholas points
> out, that is naughty.  Remember:
> 
>       sizeof(char) >= sizeof(short) >= sizeof(int) >= sizeof(long)

I think it's time for me to go home for today.  Please reverse the >
signs as you read :-)

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Reply via email to