[clean-list] Clean in the Real World
Marco Kesseler
m.wittebrood@mailbox.kun.nl
Mon, 15 Dec 2003 15:02:25 +0100
>On 15-Dec-2003, Arjen van Weelden <arjenw@cs.kun.nl> wrote:
>> As I see it, catching exceptions is only non-deterministic between
>> compilations.
>
>You may see it that way, and it might perhaps even be true for the
>current Clean implementation, but that's not the case in general.
>IMHO imposing that as a requirement would unduly restrict the
>compiler's freedom to optimize code.
As long as it optimises at compile time, it is free to do whatever it
wants, except at a few locations that hold catch statements.
>It would rule out or significantly restrict important categories of
>implementations, including those that do automatic parallelization,
>and those that initially evaluate code naively and then apply
>optimizations based on run-time profiling feedback.
As soon as we get these, I am willing to think about other ways to
deal with exceptional situations.
Apart from that, the same non-deterministic effects will occur in the
Monadic solution. The fact that this is theoretically allowed may not
help the average programmer in reasoning about his program.
(which does _not_ imply that I am against soundness)
And then, there is still the possibility to enforce catch statements
to always deliver the same constant expression on any exception.
>--
>Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
>The University of Melbourne | of excellence is a lethal habit"
>WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
>
>
>_______________________________________________
>clean-list mailing list
>clean-list@cs.kun.nl
>http://www.cs.kun.nl/mailman/listinfo/clean-list