[Haskell-cafe] Looking for a paper [Dijkstra-Dot]

Manuel Gómez targen at gmail.com
Sun Jun 7 16:25:31 UTC 2020


On Sun, Jun 7, 2020 at 5:44 PM Ben Franksen <ben.franksen at online.de> wrote:
> That said, he did write in one of his EWDs that beginners(!) should be
> tought programming with a language that does /not/ have an
> implementation available, in order to enourage thinking denotationally
> about programs rather than operationally, right from the start. The
> reason he preferred an imperative language for such a beginner's course
> (and also for communicating algorithms) is that recursion has a more
> complicated semantics (in terms of weakest preconditions) than his 'do'
> loop construct. This is important if, like Dijkstra did, you introduce
> every language construct by formally stating its denotational semantics,
> playing down the operational aspect as much as possible.

As a fun anecdote, Dijkstra's language referred to here, the Guarded
Command Language, has actually seen several implementations despite
his explicit intent for implementations never to exist:

https://metacpan.org/pod/Commands::Guarded
https://web.archive.org/web/20091214010836/http://www.dc.fi.udc.es/ai/~cabalar/gcl/
https://web.archive.org/web/20080622163307/http://gacela.labf.usb.ve/GacelaWiki/

The last one there was actually used in the university I went to as
the language for the first programming course for incoming CS students
for the better part of a decade, until the department switched those
courses to Python.

Of note, also, is that 12 years passed from EWD1036 to his letter on
using Haskell to teach introductory programming.  I wonder if he ever
wrote or shared his thoughts on whether this was merely a pragmatist's
compromise, or a change of heart in light of Haskell's progress over
those years: why did he not stick to GCL?


More information about the Haskell-Cafe mailing list