Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #3255
| From | gah4 <gah4@u.washington.edu> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: What attributes of a programming language simplify its use? |
| Date | 2022-12-06 12:43 -0800 |
| Organization | Compilers Central |
| Message-ID | <22-12-008@comp.compilers> (permalink) |
| References | <22-12-001@comp.compilers> <22-12-003@comp.compilers> <22-12-004@comp.compilers> <22-12-007@comp.compilers> |
On Tuesday, December 6, 2022 at 10:28:44 AM UTC-8, Keith Thompson wrote: (snip) > long long and int64_t are not the same (though int64_t may be the same > type as long long in a given implementation). long long is *at least* 64 > bits. int64_t is *exactly* 64 bits, and must have a 2's-complement > representation and no padding bits. "int int" is a syntax error. > (I'm not arguing that C's integer type system isn't overly complicated.) It seems that many Fortran programmers now assume that KIND=8 (for REAL) is a 64 bit IEEE floating point value, and I suspect for INTEGER that it is a 64 bit integer. Fortran makes no claim on the numerical values of KINDs. It doesn't seem too surprising, then, that some would miss the distinction between int64_t and long long. In the early days of 64 bit computing, which I mostly remember from the DEC Alpha, C compilers made long the 64 bit type. That, then, broke too much software assuming long was 32 bits. Much of IP networking evolved when C int was either 16 or 32 bits, but you didn't really know. When short was reliably 16 bits, and long was reliably 32 bits. So, we have things like htonl() and ntohl() for converting 32 bit values to/from network byte order. (The l stands for long.) Since networking code, especially cross platform, depends more on exact lengths than many others, that was one that had to get done right pretty early. (Cross platform file formats, too.) So then we got long long as the (close enough to) reliable 64 bit type. Maybe in a few years, we will have the long long long 128 bit type. But C syntax has been confusing due to the reserved words and need for additions in more than just data types. There are stories that I don't remember on the different uses of the word "static" in C. Though maybe not quite as many as Fortran uses for *.
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
What attributes of a programming language simplify its use? gah4 <gah4@u.washington.edu> - 2022-12-01 14:20 -0800
Re: What attributes of a programming language simplify its use? gah4 <gah4@u.washington.edu> - 2022-12-02 02:09 -0800
Re: What attributes of a programming language simplify its use? Thomas Koenig <tkoenig@netcologne.de> - 2022-12-03 10:25 +0000
Re: What attributes of a programming language simplify its use? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2022-12-03 22:16 +0100
Re: What attributes of a programming language simplify its use? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-12-06 09:56 -0800
Re: What attributes of a programming language simplify its use? gah4 <gah4@u.washington.edu> - 2022-12-06 12:43 -0800
Re: What attributes of a programming language simplify its use? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2022-12-07 10:14 +0000
Re: What attributes of a programming language simplify its use? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2022-12-07 12:13 +0100
Re: What attributes of a programming language simplify its use? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-12-07 17:53 -0800
Re: What attributes of a programming language simplify its use? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2022-12-08 21:42 +0100
Re: What attributes of a programming language simplify its use? gah4 <gah4@u.washington.edu> - 2022-12-08 14:44 -0800
Re: C types, was What attributes of a programming language simplify its use? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2022-12-09 15:01 +0100
Re: C types, was What attributes of a programming language simplify its use? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-12-08 18:35 -0800
Re: C types, was What attributes of a programming language simplify its use? David Brown <david.brown@hesbynett.no> - 2022-12-09 13:21 +0100
Re: What attributes of a programming language simplify its use? gah4 <gah4@u.washington.edu> - 2022-12-12 00:00 -0800
Re: C types, was What attributes of a programming language simplify its use? "marb...@yahoo.co.uk" <marblypup@yahoo.co.uk> - 2022-12-09 07:40 -0800
Re: C types, was What attributes of a programming language simplify its use? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2022-12-11 10:45 +0000
Simple to implement and to use Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-12-11 19:41 +0200
Re: What attributes of a programming language simplify its use? Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-12-03 23:33 +0000
Re: What attributes of a programming language simplify its use? gah4 <gah4@u.washington.edu> - 2022-12-03 17:15 -0800
csiph-web