Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!n3dmc!gronk!johnl From: johnl@gronk.UUCP (John Limpert) Newsgroups: comp.unix.wizards Subject: Re: bigger longs (64 bits) Message-ID: <649@gronk.UUCP> Date: 20 Feb 90 18:17:36 GMT References: <11372@attctc.Dallas.TX.US> <194@hico2.UUCP> Reply-To: johnl@gronk.UUCP (John Limpert) Organization: BFEC/GSFC Greenbelt, Maryland Lines: 36 In article <194@hico2.UUCP> kak@hico2.UUCP (Kris A. Kugel) writes: >We are starting to have problems because of the wide variety of >wordsizes on the machines UNIX runs on. Does it make sense that >a long is such a different size on different machines? What if >you want a guarenteed precision? I'm beginning to think that >some kind of declaration construct like int(need32) var; is needed. Sounds like you want declarations like those in PL/I or ADA. I think it would be a real bucket of worms for compiler developers. C is primarily a systems programming language, it makes no attempt to hide the hardware from the programmer. The virtual machine philosophy used by some programming languages just isn't appropriate for C. Typedefs and defines can be used to match native machine types to the needs of the program. >The layout of structures is another problem; my friends at NETWISE >seem to think that they have a solution, but it seems to me to >make more sense to be able to specify exact layout, good over >ALL machines, than to translate every message sent over a >hetrogenous network. But this means language support. Isn't it >about time we bit the bullet and decided that the C language needs >to support types, structures, and ints that look the same from one >machine to another? We are only going to network more in the future, >not less. This would cause big problems for machines that differ significantly from the architecture of the proposed 'C virtual machine'. I expect C to give me efficient use of the hardware. If I wanted portability at any cost then I would use ADA. Suggestions of this sort seem to come up with regularity. Don't try to change C into some nice, safe, portable programming language with all sharp edges removed, pick another language. -- John Limpert johnl@gronk.UUCP uunet!n3dmc!gronk!johnl