Re:Dennis Ritchie’s first C compiler (c. 1972)
by _kst_ on Thursday March 11, 2021 @12:31PM
(#26426618)
Well, you can certainly think of "long" and "short" as adjectives, but the grammar doesn't treat them that way.
"long", "short", "signed", "unsigned", "int", "float", and "double" are all type specifiers. The language specification includes an exhaustive list of the valid combinations of type specifiers, including which ones refer to the same type. The specifiers can legally appear in an order. For example, "short", "signed short", and "int short signed", among others, all refer to the same type. (They're referred to as "multisets" because "long" and "long long" are distinct.)
The "double" comes from double-precision floating point. In the 1970s and 1980s anyone who came near a computer would know what that meant. Anyone who ever had to use a log table or slide rule (which was anyone doing math professionally) would know exactly what that meant.
There are good sound reasons for the well-chosen keywords. Just because one is ignorant of those reasons does not mean they were not good choices.