The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: toby@telegraphics.com.au (Toby Thain)
Subject: [TUHS] Why Pascal is Not My Favorite Programming Language - Unearthed!
Date: Fri, 1 Sep 2017 10:43:48 -0400	[thread overview]
Message-ID: <ada36aea-dc85-71b1-8a68-5210a003ae27@telegraphics.com.au> (raw)
In-Reply-To: <CAEoi9W5FPUihmWh8p8sCKb8k57YvM=tJJQzxWaWJid84yXG-0w@mail.gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4056 bytes --]

On 2017-08-31 10:38 PM, Dan Cross wrote:
> On Thu, Aug 31, 2017 at 3:47 PM, Toby Thain <toby at telegraphics.com.au
> <mailto:toby at telegraphics.com.au>> wrote:
> [snip] 
> 
>     > But the problem was that in those days, because Wirth had designed it
>     > for complete small student programs, it was hard to write large real
>     > programs (as Brian points).  So people fixed it and every fixed it
>     > differently.  Pascal was hardly standardized. ...
>     >
>     > And this was the root of the real problem.
>     >
>     > You could not write “real” programs in it and really make them run on
>     > actual systems.   Brian was writing that paper, after an exercise in
> 
> 
>     Professor Knuth seemed to manage OK, writing TeX and METAFONT in Pascal
>     (using his literate programming toolset, but that did not extend the
>     language much).
> 
> 
> 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.
> 
> I've often wondered to what extent (natural) language shapes thought ...

> I have long suspected that it is true of programming. 

I don't think any of the above is in doubt.


> While most of the
> languages we use are Turing complete (I suppose that in the limit one
> can write a Common Lisp implementation in C, for example), it is
> unarguable that some languages make it *easier* to express some things
> than other languages. In some cases this is deliberate: consider
> languages with strong, static type systems versus dynamic but strongly
> typed languages (or statically but weakly typed). Here the language
> designers have intentionally made it hard to escape the tyranny of the
> type system in order to prevent bugs.

(Tyranny is not the word I would use. A more modern viewpoint would
include topics like parametric polymorphism, typeclasses and so on.)

> 
> 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


It seems inconceivable to me that there are "ambitious parts" of TeX and
METAFONT that Professor Knuth had to omit because he was using Pascal.
Knuth has shown himself in various ways (including MIX, but also his
literate programs in Pascal and C) to prefer programming at low levels
(by modern standards) but his code amply shows that Pascal barely
presented any impediment to doing so -- though he now uses literate C.

Of course his programs would look different in, say, Haskell or Ocaml.

I have not compared the codebases but wouldn't one expect that the final
production TeX rewrite is *more* ambitious than the early SAIL version?
(By the time I began using/porting TeX in the 1980s, the older version
was completely obsolete.)


> 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.

I honestly don't know what limitations you mean. If you mean "different
style of expression," sure. (Maybe if SAIL had lexically scoped lambda
closures, there'd be a difference worth talking about...)

> 
> Regardless, comparing the work of a Knuth to the industry average is
> more than a bit unfair. :-)
> 
>     I suppose Apple's Pascal and Object Pascal -- used for Lisa and
>     Macintosh applications and systems software -- comes under the "so
>     people fixed it" category?
> 
> 
> Object Pascal, Delphi and Free Pascal (which seeks to implement the best
> of both) seem to have definitely fallen into that category.

I'm not sure if the Apple compiler used circa 1983 was *Object* Pascal
but it was certainly extended with many intrinsics, casts, and pointer
operations, bringing it essentially into parity with C for systems and
application programming.

--Toby


> 
>         - Dan C.
> 



  parent reply	other threads:[~2017-09-01 14:43 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30 12:34 arnold
2017-08-30 14:13 ` Eric Wayte
2017-08-30 14:30 ` Michael Kjörling
2017-08-30 14:43   ` Eric Wayte
2017-08-30 17:10 ` Mutiny 
2017-08-30 22:33 ` Michael Parson
2017-08-31  0:55   ` Nemo
2017-08-31 13:29     ` arnold
2017-08-31 18:24       ` Nemo
2017-09-03  0:56         ` Dave Horsfall
2017-09-03 12:07           ` arnold
2017-09-03 22:03             ` Dave Horsfall
2017-09-04 12:12               ` Steffen Nurpmeso
2017-08-31  1:13 ` Bakul Shah
2017-08-31 14:48   ` Larry McVoy
2017-08-31 15:26     ` Eric Wayte
2017-08-31 16:12       ` Warner Losh
2017-08-31 17:51         ` Larry McVoy
2017-08-31 18:40           ` Clem Cole
2017-08-31 19:25             ` Steffen Nurpmeso
2017-09-01  1:57               ` Nemo
2017-09-01 14:17                 ` Steffen Nurpmeso
2017-09-01 14:28                   ` Arthur Krewat
2017-09-01 14:48                     ` William Cheswick
2017-09-01 15:15                       ` Clem Cole
2017-09-01 15:47                       ` Arthur Krewat
2017-09-01 16:21                       ` Nevin Liber
2017-09-01 16:34                       ` Dan Cross
2017-09-02  0:24                         ` Dave Horsfall
2017-08-31 19:47             ` Toby Thain
2017-08-31 20:37               ` William Cheswick
2017-08-31 20:51                 ` Clem Cole
2017-09-01  0:52                   ` Bakul Shah
2017-08-31 21:46                 ` Larry McVoy
2017-08-31 21:59                   ` Arthur Krewat
2017-08-31 22:08                     ` Larry McVoy
2017-09-01  1:11                       ` Steve Johnson
2017-09-01  0:57                   ` David Arnold
2017-09-01  1:22                   ` Bakul Shah
2017-09-01  1:26                     ` Larry McVoy
2017-09-01  1:51                       ` Kurt H Maier
2017-09-01  2:22                       ` Bakul Shah
2017-09-01  2:27                         ` Larry McVoy
2017-09-01  2:58                           ` Bakul Shah
2017-09-01  3:12                       ` Dan Cross
2017-09-01  2:51                     ` Dan Cross
2017-08-31 20:37               ` Clem Cole
2017-08-31 21:26                 ` Toby Thain
2017-09-01  2:38               ` Dan Cross
2017-09-01  3:59                 ` Toby Thain
2017-09-01 15:57                   ` Dan Cross
2017-09-01 16:08                     ` Toby Thain
2017-09-01 18:15                       ` [TUHS] Future Languages (was Pascal not Favorite...) Steve Johnson
2017-09-01 18:43                         ` ron minnich
2017-09-01 23:33                           ` Chris Torek
2017-09-04 20:55                             ` ron minnich
2017-09-01 20:42                         ` Clem Cole
2017-09-04 20:44                         ` Bakul Shah
2017-09-01 13:46                 ` [TUHS] Why Pascal is Not My Favorite Programming Language - Unearthed! Clem Cole
2017-09-01 14:43                 ` Toby Thain [this message]
2017-09-01 15:14                   ` Clem Cole
2017-09-01 16:22                   ` Dan Cross
2017-09-01 19:07                     ` Toby Thain
2017-09-02 13:25                       ` Dan Cross
2017-09-02 15:00                 ` Toby Thain
2017-09-02 15:16 Diomidis Spinellis
2017-09-02 19:53 ` Toby Thain
2017-09-03 14:48 Norman Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ada36aea-dc85-71b1-8a68-5210a003ae27@telegraphics.com.au \
    --to=toby@telegraphics.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).