"Pascal and its Successors" - Niklaus Wirth

C vs Other.
Index checking really only needs to be done entering a loop. The problem is the index limits
are not bound to the array vector in C. structure array { constant index -low, constant index-high,
int max-indexed, * data array[#] } could have made a big change in how you wrote programs.

Nobody seems to point out in C you had only static, and stack local variables, very easy
to write fast code for. With ALGOL and PASCAL you get all kinds of weird nesting forcing use
of displays to be copied with every subroutine, and complex display addressing for every variable and slower code.
begin
int private,sailer := false;
if private then fobar := true
call enlist ()
end

subroutine enlist
… where := if fobar then ARMY else NAVY fi ;
this is not nice code.

People compained how early compilers produced poor code,
nobody looked at how the language was designed instead. 3 people for C
coming from BCPL. Great code.
ALgol (Pascal) 10 years of discussion + 1 year with Wirth
making things simple again. Good code on a main frame.
Algol … still being revised from 1968, and poor speed emulated BYTE code.

Modern CPU’s scope well with stack frame displays nowadays. If you think of a 6502, well, there even C is not a real performer and a memory hog.

Giving up scopes for speed makes C a low level language, just a layer above assembler. Abstract enough to make it portable though.
Combined with the syntax chosen, memory management by the user causing memory leaks, it may be efficient and portable, but not my choice for a high level language guarding the programmer.

But C is a production langauge, not like some toy langauge used for teaching that thinks it knows
best .Look how many Computers sold with (COLOR) BASIC in ROM. Writing computer programs
with a 8K or 16K word total memory space on early UNIX was the constraint C had back then.
Unix and DOS 2.0 are the only operating sytems I can think of back then that made using
files and devices easy, rather getting bogged down trivial access details Getting away from punched cards was the big new feature at the time.

I don’t mind being ‘guarded’ but knowing just what block of code compiles to is more useful
for me. I use ADHL for programing FPGA’s (hobby) and having strong checking has saved my
butt several times.I don’t simulate, but test on real hardware by trial and error. 10%
of my designs work, the other 90% don’t because of routing issues with set up and hold times
or the design works only with the other FPGA vender.
I don’t use VHDL or VERLOG because they are so verbose I don’t know just was it is doing.
WinCUPL works good for me, and a Xgen pro programer for GAL’s, this I can test until I get things right.
Wirth’s languages have better protection for the programmer, but the educational enviorment
I think limited its design as a student compiler untill modula 2, but by then C and Unix had taken over.

C can self compile, it self, Pascal can’t with type checking.
Ben.

C is a production language, not like some toy language used for teaching .. you should look at Delphi or Freepascal/Lazarus to see real modern production languages. Or VAX/VMS Pascal or many more good examples of production quality Pascal compilers in the 80ties.

C can self compile, it self, Pascal can’t with type checking. That is nonsense, Pascal compilers from the start were self compiling. Read about Wirth and his work on compilers!

2 Likes

The PASCAL run time code or a OS can not be written in standard PASCAL.
The run time allways seems to closed source, so I have never been able to
study that code in detail.

I got stuck with MS Windows for historical reasons
and have a limited computing budget, so I never read Wirth’s published books
or used PASCAL.
No VAX here. I can buy a used VAX for a song,but I have NO low cost OS
to run it on.
I live in a rural area, so I have limited access to real books.
The few PDF’s I have downloaded on compiling have too many printing errors
in the code, to be readable.

Wirth promoted fast single pass compiling, from a single
source file. Hardware could now support that idea as you had more than 8 K
of memory and a OK operating system for file IO. This gave computer science
people a languge that had everthing they wanted for the 70’s.

Dear oldben,

This topic is about Niklaus Wirth and his valuable contribution to and lasting influence on computer science.

I forgive you for being less informed …though it seems unnecessary with the wealth of information that is available nowadays. For example most Wirth’s books are readable online. Either as published by Wirth himself or in a quality scan.
I can point you to many well documented sources of Pascal compilers, compiler and runtime, not closed source but open and visible.
If you want to experience old systems, many many emulators are available.
VMS on a Raspberry Pi or Windows for example!

2 Likes

(The mods can easily re-thread a conversation which has gone off-topic - please feel free to flag a post which has drifted too far. Happy to rethread this one on request - please send a direct message. Ideally we will do this rarely, because it’s very easy to start a new topic for a new idea and it helps both the old conversation and the new one.)