">>" and "do" notation

Dylan Thurston dpt@math.harvard.edu
Wed, 3 Apr 2002 01:40:44 -0500


--TB36FDmn/VVEgNH/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Tue, Apr 02, 2002 at 08:48:41PM +0100, Jon Fairbairn wrote:
> Point taken, but I remain unconvinced. What comes out of the
> monad /isn't/ abstract; there's nothing to ensure that
> subsequent use respects the abstraction.

Sure.  That's the programmer's responsibility to keep track of.  To me
the situation seems entirely analogous to defining a '+' operation that
is not associative; if the programmer wants to do it, more power to her.
(In fact, the standard '+' on floating point numbers is not
associative.  Sometimes it matters!)

These considerations are the reasons compilers are typically prohibited
from taking advantage of such laws, and why the translation from the
'do' notation should be the obvious one (using '>>').

Best,
	Dylan Thurston

--TB36FDmn/VVEgNH/
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8qqPsVeybfhaa3tcRAr4hAKCOGDK7LevWIwrD77yFA879/Gk0ZwCgkbhm
gWwmIYRNRu+pWYV/2ArUnI4=
=7e71
-----END PGP SIGNATURE-----

--TB36FDmn/VVEgNH/--