PASCAL as a system's programming language

Michael Ellis ellis at spar.UUCP
Fri Jan 11 00:35:40 AEST 1985


>From Ken Perlow:
>--
>Actually, all PASCAL needs to be a superior systems language to C is a
>casting operator, assuming the compiler knows how to optimize
>programming constructs like sequential array references.

My experience implementing a filesystem in PASCAL was surprisingly
positive given the bias I held toward C at the time. The only deviation
from Jensen-Wirth's standard required to transform PASCAL from a toy
into a credible language is separately compilable modules.

Casting operators can then be written in PASCAL as functions which blindly
return whatever is passed to them (the assumption here is that type-checking
is ineffective across compilations). Such functions also serve the purpose
of C's `&' operator.

One still must code assembly routines in order to escape PASCAL's detestable
(that word is too mild!) I/O `philosophy'; again, separately compilable
modules provide this avenue.

The features of PASCAL I miss most when programming in `C' are:

1) The debugging power of PASCAL's subrange types.
2) Notational consistency, especially with structures, arrays and pointers.

It's unfortunate that C is irrevocably brain-damaged by the lack of
coherence and clarity as regards item (2). 

-michael ellis



More information about the Comp.lang.c mailing list