Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!mit-eddie!mintaka!spdcc!ima!dirtydog!karl From: karl@ima.isc.com (Karl Heuer) Newsgroups: comp.std.c Subject: Re: question about an array of enum Message-ID: <1990Nov06.200927.28712@dirtydog.ima.isc.com> Date: 6 Nov 90 20:09:27 GMT References: <9130019@hpavla.AVO.HP.COM> Sender: news@dirtydog.ima.isc.com (NEWS ADMIN) Reply-To: karl@ima.isc.com (Karl Heuer) Organization: Interactive Systems Lines: 18 In article mcdaniel@adi.com (Tim McDaniel) writes: >[So, the array-of-enum might use up an int per slot. Who cares?] In particular, in the case of emulating a bit array, the distinction between 8-bit chars and 32-bit ints is less than that between chars and bits in the first place. If a 32-bit int is too wasteful, then so is an 8-bit char. >> Then, some day if the language supports [arrays of bits], you will >> be able to upgrade painlessly. > >Can't happen. "sizeof (char) == 1" is now fixed in the language, as >is the fact that it yields an integral type. What this really implies is that, if bit arrays are ever supported, they won't fit cleanly into the existing language and hence will probably not support all the same features as "normal" arrays. Karl W. Z. Heuer (karl@ima.isc.com or uunet!ima!karl), The Walking Lint