[Haskell-cafe] Re: [Off topic] Proving an impossibility

Jon Fairbairn jon.fairbairn at cl.cam.ac.uk
Tue Sep 4 10:03:46 EDT 2007

"Brandon S. Allbery KF8NH" <allbery at ece.cmu.edu> writes:

> On Sep 4, 2007, at 5:02 , Miguel Mitrofanov wrote:
>>> It depends on arbitrary restrictions on what constitutes an
>>> (boolean) expression, something that is anathema to
>>> functional programmers :-) Spot the language:
>>> while if E
>>>       then S; F
>>>       else False
>>>       fi
>>> do T
>>> od
>>>> It reminds me of a paper by Knuth, where he states that
>>>> "goto" statement is necessary; don't remember the title,
>>>> however.
>>> I don't remember needing a goto in Haskell...
>> Well, for imperative languages, of course.
> We're talking goto-the-concept, since "break" counts as
> "goto";

I hadn't interpreted the "reminding of Knuth" that way. I
wouldn't count break as a goto -- what makes goto especially
nasty is that the destination isn't indicated by the
structure of the source; it could be just anywhere. Break is
slightly more structured.

> thus, so does MonadCont, and so does pattern match failure
> in a monad.

I've never been entirely happy with those...

Jón Fairbairn                                 Jon.Fairbairn at cl.cam.ac.uk

More information about the Haskell-Cafe mailing list