(Interesting.
I hadn't previously noticed that << was undefined but
>> was implementation-defined in the negative case. I wonder
>> why....)
Because there's more than one machine that has shift right
as an
arithmetic (sign-extended) operation, with shift-left being a logical
(shift zeroes into the lsb and toss the msb).
I don't see that as a reason to make one implementation-defined but
push the other into nasal demon territory. Making both of them
implementation-defined would be quite sufficient for such a machine.
Dijkstra didn't mention it in his tirade against
the 1620, but there
are characters/digits(?) on the 1620 that can't be compared (e.g.
record, group marks), only tested for
Then they can be compared, just not directly. :-)
and one (numeric blank) that can neither be tested for
nor compared.
Is there a spec somewhere? I'd be interested; I suspect there may be a
way to test for it, albeit somewhat roundabout way, but I'd have to see
a machine spec to be sure.
In any case, there's no reason the 1620 in particular has to support
something Cish, the way I sketched or any other; for anyone who wants
to experiment, there are plenty of other decimal architectures.
I think this page makes an interesting read:
It does.
Its author would benefit from actually knowing C before critiquing it
and would also benefit from recognizing the difference between "this is
better" and "I prefer this" (or, possibly, "I'm used to
this"). And,
of course, there's the really big one, the difference between C's
design tradeoffs and PL/I's design tradeoffs.
One attraction of C was that it was a cheap
close-to-assembler
language with a small vocabulary. One could become usefully fluent
in K&R C over the space of a weekend. With the latest incarnations
of C++, I'm not sure that I could become usefully fluent in six
months.
What's that got to do with anything? C++ is not C.
Similarly, PL/I's biggest liability is that
it's a very large
language and somewhat difficult to master in a short amount of time.
From what little I know of it, it's also a parser
author's nightmare.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse at
rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B