:In C, `/' is sometimes used to denote division and sometimes not. If at
:least one of the operands is a floating point number you will get the
:expected result, but if both operands are integers you will get the
:quotient of the division. This is one example of how C uses a familiar
:symbol and makes it do something unexpected (the assignment operator is
:another example). At least some languages got it right (e.g. Oberon) and
:use for instance `:=' for assignment and `DIV' for the quotient of
:division of integers.
:Furthermore, when familiar symbols have a classical interpretation and a
:"C" interpretation,
The Oberon Report indicates that / is "quotient" and DIV is
"integer quotient". You indicated that in C if both operands are
integers that you will get the "quotient" -- the same word used by
Oberon but with different meaning. What you wrote is thus inconsistant
with Oberon, so if Oberon "got it right" then either:
a) you "got it wrong" or;
b) you must admit that words and symbols are inherently ambiguous
and contextual.
http://www.oberon.ethz.ch/oreport.html#Expressions
If you are going to talk about "classical" interpretations
and "familiar symbols", then Oberon does *not* "get it right".
The "classical" meaning of / (solidus), dating back hundreds of
years, is as a seperator between shilling and pence in writing currency.
The use of solidus as meaning division only goes back a little over
a hundred years according to OED. The use of the solidus as
integer division in C (1972) is directly taken from the same use
in Kerninghan's B (1970) -- predating the decimalization of
UK coinage in 1971. Thus if you want to argue that C should have
adopted "classical" usages, then the use of the solidus should
indicate values in which the first portion is weighted 20 times the
second portion.
But you shouldn't even blame Kerninghan's "B" language. The use
of the solidus for integer division goes at least as far back
as the original FORTRAN specification in 1954. I refer you to
"D. FIXED POINT EXPRESSIONS" in
http://community.computerhistory.org/scc/projects/FORTRAN/BackusEtAl-Preliminary Report-1954.pdf
C's use of the solidus was thus "the familiar symbol" *to programmers*.
And if you read the history of C, you will note that Kerninghan and
Ritchie were not -intending- to write a language to be widely adopted
by the general public -- they weren't -intending- to write an
replacement for (say) Algol 68.