On May 29, 2020, at 5:24 PM, Jim Brain via cctalk
<cctalk at classiccmp.org> wrote:
On 5/29/2020 4:06 PM, Paul Koning via cctalk wrote:
On May 29, 2020, at 4:25 PM, Norman Jaffe via
cctalk <cctalk at classiccmp.org> wrote:
C is portable by design and runs on many architectures.
It doesn't need 512Kb of RAM and it doesn't depend on Unix.
Yes. But the
same is true for many languages. Fortran is a particularly good example, but there are
plenty of portable languages (Algol, Basic, LISP, Python, COBOL, Ada, RPG, ...). Some
more than C; for example, C doesn't like one's complement machines (though it has
been ported to at least one) and things get somewhat interesting if the machine
doesn't have byte addressing.
Since C aims to be a system implementation language, unlike Fortran or Basic or Algol, it
tends to expose, or at least let you see, machine details. That can get in the way of
portability. One small example is that C thinks address 0 is a null pointer rather than a
valid pointer. On modern systems that is true (partly because C says so) but on a PDP-11
it isn't.
paul
At the risk of fanning the language fire, C seems to be a smaller step up from
native machine language than most other languages. It's like 80% of the portability
with 20% of the effort of writing directly in ASM.
Jim
True. "High level assembly language" is one tag applied to C. It also means it
has weaker safety properties than most high level languages. Being "feebly
typed" is one example.
There are certainly other, lesser known, languages that have similar properties. FORTH is
one. Two that are not inherently machine-specific but were only found on one architecture
are ESPOL (Burroughs mainframes) and SYMPL and CYBIL (CDC 6000 series mainframes). And of
course BLISS, on a number of DEC machines.
paul