Re: A tiny self-hosting compiler used for teaching

Christopher F Clark <christopher.f.clark@compiler-resources.com>
Mon, 07 Sep 2026 23:26:20 +0300

          From comp.compilers

Related articles
[5 earlier articles]
Re: A tiny self-hosting compiler used for teaching gneuner2@comcast.net (George Neuner) (2026-09-05)
Re: A tiny self-hosting compiler used for teaching ram@zedat.fu-berlin.de (2026-09-05)
Re: A tiny self-hosting compiler used for teaching gneuner2@comcast.net (George Neuner) (2026-09-05)
Re: A tiny self-hosting compiler used for teaching michael.lehn@uni-ulm.de (Michael Lehn) (2026-09-05)
Re: A tiny self-hosting compiler used for teaching michael.lehn@uni-ulm.de (Michael Lehn) (2026-09-05)
Re: A tiny self-hosting compiler used for teaching gneuner2@comcast.net (George Neuner) (2026-09-07)
Re: A tiny self-hosting compiler used for teaching christopher.f.clark@compiler-resources.com (Christopher F Clark) (2026-09-07)
Re: A tiny self-hosting compiler used for teaching michael.lehn@me.com (Michael Lehn) (2026-09-05)
Re: A tiny self-hosting compiler used for teaching ram@zedat.fu-berlin.de (2026-09-08)
Re: A tiny self-hosting compiler used for teaching martin@gkc.org.uk (Martin Ward) (2026-09-09)
| List of all articles for this month |
From: Christopher F Clark <christopher.f.clark@compiler-resources.com>
Newsgroups: comp.compilers
Date: Mon, 07 Sep 2026 23:26:20 +0300
Organization: Compilers Central
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="24329"; mail-complaints-to="abuse@iecc.com"
Keywords: courses, design
Posted-Date: 08 Sep 2026 03:33:10 EDT

While I agree with our esteemed moderator's point about aesthetics, it
is worth noting that Wirth intentionally made Pascal easy to parse.
Thus, the Pascal declaration notation was designed to be parsed with a
one pass compiler.
Thus, arguing that the syntax is easy to read and understand has some
objective support.


However, it is worth noting that picking up C declaration syntax is
for the most part also simple and intuitive if one ignores pointers to
functions where we have both a prefix and a suffix operator that need
to be disambiguated as to their precedence. But C's notation does
have the nice aspect that declaration syntax matches usage.


And, one can get both, although it looks a bit tortured to my eyes,
but it might just be that I'm not used to it, yet
You follow C's convention, but put the result type where the variable
goes in usage and then string the operators around it.
Moreover, If all the operators are suffix operators, there is also no
ambiguity over precedence..


a: int->[10] // a pointer an array of 10 ints
b: int [10] -> // an array of 10 pointers to ints


******************************************************************************
Chris Clark email:
christopher.f.clark@compiler-resources.com
18 Meadow Rd Web Site: http://world.std.com/~compres
Bolton, MA 01740 USA voice: (508) 435-5016
------------------------------------------------------------------------------


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.