[Haskell-cafe] Monads, do and strictness

David Barbour dmbarbour at gmail.com
Sun Jan 22 17:51:54 CET 2012


2012/1/22 MigMit <miguelimo38 at yandex.ru>

>
>
> Отправлено с iPad
>
> 22.01.2012, в 20:25, David Barbour <dmbarbour at gmail.com> написал(а):
> > Attempting to shoehorn `undefined` into your reasoning about domain
> algebras and models and monads is simply a mistake.
>
> No. Using the complete semantics — which includes bottoms aka undefined —
> is a pretty useful technique, especially in a non-strict language.


It is a mistake. You mix semantic layers - confusing the host language with
the embedded language. If you need to model non-termination or exceptions
or the like, you should model them explicitly as values in your model. That
is, *each* layer of abstraction that needs `undefined` should explicitly
have its own representation for such concepts, rather than borrowing
implicitly from the host.

Regards,

Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120122/705b0107/attachment.htm>


More information about the Haskell-Cafe mailing list