On Thu, Aug 31, 2017 at 10:38 PM, Dan Cross <crossd(a)gmail.com> wrote:
....
To be fair, I think that Knuth originally wrote both TeX and METAFONT in
the SAIL language for the PDP-10. He switched to Pascal (again on the
PDP-10) later.
Dan, True enough but .... having learned Pascal on the 10 (well 20 at
that point)
and SAIL on the 10s, the differences between them were minor in
this case. I suspect the conversion was done in a few days in emacs.
SAIL basically was the Python of its day - with a load of libraries that
people used. But it was just an extended Algol with a number of
PDP-10isms. I have a the manual if you are curious (and I even had
??have?? a working compiler for the Masscomp [68000] at some point).
...
Anyway, I wonder if Knuth would have produced the same TeX and METAFONT
had he started in Pascal; perhaps he would have, but maybe he would have
given up on some of the more ambitious parts of both because the language
made it much less convenient (not knowing SAIL, I'm speculating). Perhaps
having gone through the exercise of producing TeX in SAIL gave him insight
that inspired him to work around Pascal's expressive limitations. Or
perhaps the opposite is true.
An interesting thought, but in this case, I'm not so sure. I think the
more interesting question is if we had developed it on a 16/32 bit system
instead of a 18/36 bit system. If I think back about moving things from
the 10s (or the CDC systems) of that day, the problem was almost always an
issue of 16/32 not being 'enough' when you move the code to the PDP-11 or
Vax later. It was less the pure language, and more the processor
representation that caused me trouble.
Funny, I remember in those days, we obtain a really nice Pascal compiler
that generated code for the 68000 that had been written on the CDC systems
somewhere in Europe ??CERN maybe??. But moving it was damned near
impossible because it was assuming the word size of the CDC system. It was
written in Pascal but because it *how* it was written, it could not even
compile itself.
We switched to Modula-II shortly there after as the C alternative, in Tek
Labs.
Object Pascal, Delphi and Free Pascal (which seeks to implement the best
of both) seem to have definitely fallen into that category.
- Dan C.
+1 Indeed - this why I still use it as a teaching tool. I start them with
a pure Pascal variant with all the bumpers and other shielding in place
that a beginner should have. If they are more interested in systems
stuff, I'll let them learn C, if they want to start to do more
applications, then I continue with Delphi or simple Java (PBH's subset) so
they learn OO before I throw C++ at them.
Ches' comment about using Rust or Go is possible, but I have not found a
book I trust. If PBH or Clancy would would redo one of their text, I'ld
feel a lot more comfortable.
Clem