Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!brl-adm!brl-smoke!smoke!rgenter@labs-b.bbn.com From: rgenter@labs-b.bbn.com (Rick Genter) Newsgroups: comp.lang.c Subject: Re: sizeof(char), is it bigger than a breadbox? Message-ID: <5386@brl-smoke.ARPA> Date: Thu, 13-Nov-86 17:16:13 EST Article-I.D.: brl-smok.5386 Posted: Thu Nov 13 17:16:13 1986 Date-Received: Thu, 13-Nov-86 22:01:22 EST Sender: croot@brl-smoke.ARPA Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 49 All of this talk about bits and bytes and chars and short chars and long chars and ints and pointers and on and on have made me realize what all you people are *really* fighting about. C has blurred the distinction between the size of data and the type of data, primarily through its use of the keywords int, short, and char. Note that "long" is OK: a "long float" (generally) gives you a longer floating point datum than a "float". What X3J11 really needs to do is specify a "fixed" type. Then we could have "fixed", "short fixed", "long fixed". In addition, we should allow "short float" on those architectures where you have three precisions of floating point data (IBM 370s come to mind). But what does this do for the poor bitmap programmer? Well, we could add a length specification, so that you say: fixed(1) bitmap[ 8 ][ 1024 ][ 1024 ]; for your bitmap image. Of course, then we can add offsets, for those who want real fixed point calculations: fixed(32,16) a_fixed_point_integer; But what about those accouting types, who don't grok binary? I know, let's add a base specification! We can limit ourselves to decimal for now: fixed decimal (10,2) profits; Uh, oh. I think I just invented PL/I. Please, Mr. IBM, no, don't shoot! Aauuggghhhh!!!!!!! I love the "American" attitude presented in this group. "If it caint be dun in mah language, it aint wuth doin'!" (or alternatively, "..., then we'll change the language so it *cain* be dun!"). Let's face it, there is no such thing as the perfect general purpose language (sorry PL/I and Ada fans), and I think it is a mistake to try and create one, because there are conflicting requirements across the set of all possible desired programs. Can't we just leave C alone? By the way, has anyone else noticed that an increasing number of the articles being posted contain LONG SEQUENCES of CAPITAL LETTERS, causing them to look like something said by ZIPPY THE PINHEAD? Rbj, have you been FOOLING with my MAILBOX again? :-) Rick -------- Rick Genter BBN Laboratories Inc. (617) 497-3848 10 Moulton St. 6/512 rgenter@labs-b.bbn.COM (Internet new) Cambridge, MA 02238 rgenter@bbn-labs-b.ARPA (Internet old) linus!rgenter%BBN-LABS-B.ARPA (UUCP)