Article View: comp.std.c
Article #3760Re: Why "long long" doesn't work.
From: Zefram
Date: Thu, 17 Aug 1995 00:27
Date: Thu, 17 Aug 1995 00:27
28 lines
2033 bytes
2033 bytes
Hallvard B Furuseth <h.b.furuseth@usit.uio.no> wrote: >In article <1995Aug13.144107.21353@dcs.warwick.ac.uk> A.Main@dcs.warwick.ac.uk (Zefram) writes: >> atleast: certainly *is* needed. > >halasz and I had an e-mail conversation after that article: >He is only talking about *syntax* here. He is saying that the >"atleast:" keyword is not necessary, a shorter syntax would be >sufficient. Which is of course true. Ah. If one will only ever want atleast semantics, this is true. In that case, I would suggest that something similar to the existing bitfield notation could be used. But exact semantics are sometimes required, so for clarity it would be much better to have an exact: specification in addition to atleast:, in which case the atleast keyword (or some confusing puctuation, or an overload of an existing keyword (return would be unambiguous :-))) is required. I think exact semantics are used sufficiently that language support is warranted. At the moment, there is a great deal of code that assumes that int (or sometimes long) is exactly 32 bits, and that short is exactly 16 bits. Much code relies on variables declared as unsigned int having a range of 0 to 0xffffffff. If no form of exact specification is provided, people *will* write code that relies on int :64 (or int atleast:64) having exactly 64 bits (which it will in most implementations). The SBEIR paper explains the need for the exact: specification quite well. -zefram
Technical Details
Message-ID:
<1995Aug17.002758.15662@dcs.warwick.ac.uk>Path:
arc1-ca.pugleaf.net!news.dcs.warwick.ac.uk!not-for-mailReferences:
<3v9s4l$9t5@caip.rutgers.edu> <3vk874$e0q@caip.rutgers.edu> <1995Aug13.144107.21353@dcs.warwick.ac.uk> <HBF.95Aug14144137@durin.uio.no>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c Path: arc1-ca.pugleaf.net!news.dcs.warwick.ac.uk!not-for-mail From: A.Main@dcs.warwick.ac.uk (Zefram) Subject: Re: Why "long long" doesn't work. X-Nntp-Posting-Host: stone Message-ID: <1995Aug17.002758.15662@dcs.warwick.ac.uk> Sender: news@dcs.warwick.ac.uk (Network News) Organization: Department of Computer Science, Warwick University, England References: <3v9s4l$9t5@caip.rutgers.edu> <3vk874$e0q@caip.rutgers.edu> <1995Aug13.144107.21353@dcs.warwick.ac.uk> <HBF.95Aug14144137@durin.uio.no> Date: Thu, 17 Aug 1995 00:27:58 GMT