Tue, 18 Jul 2000 14:48:36 +0200 (MET DST), Wilhelm B. Kloke 
<[EMAIL PROTECTED]> pisze:

> If you mind that this could be exploited to create side-effects,
> you have to wrap FP into a monad.

Not side effects but "unstable" values. IMHO it would be too pedantic,
although theoretically necessary. A programming language should be
convenient for programming. Given the style of the rest of Haskell,
advantages of having pure floating point operations are bigger than
disadvantages of their "impossible" behavior, assuming that the
operations are unstable anyway and we only consider their interface.
Especially as we have a "correct" alternative implementation.

This impurity is like readFile; maybe a little worse. readFile
should not return a lazy string but read the whole file at once
(because the given value may depend on future I/O actions; at least
it's stable, i.e. is determined once read). readFile can be used to
write "impossible" functions, not possible without it. But readFile
is convenient.

This impurity is like GHC's exceptions. They allow reliable (at
least in practice, I'm not sure about the theory) distinguishing of
'error "string"' values with different arguments passed, although
the language formally states that bottom is simply bottom.

We should be aware and have documented where these shortcuts exist,
but they are useful.

-- 
 __("<  Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
 \__/            GCS/M d- s+:-- a23 C+++$ UL++>++++$ P+++ L++>++++$ E-
  ^^                W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP+ t
QRCZAK                5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-




Reply via email to