monad thinking process

Eray Ozkural (exa)
Fri, 25 Jan 2002 15:37:39 +0200

Hash: SHA1

On Friday 25 January 2002 14:14, Cagdas Ozgenc wrote:
> What do monad experts think? What do you think of code readability? How
> easy is it to prove that programs written with monads are correct? How does
> changing one function affect other functions, in terms of maintenance?

It would certainly make proving programs much more easier, but not 
necessarily the coding. An imperative language gives you a lot more freedom, 
and more opportunities for fatal and undetectable errors. On the other hand, 
a monadic functional code is somewhat like a very strongly typed imperative 
language; the compiler will enforce type compatibility in every statement you 
type. I would say the granularity of type checking is finer.

In any case, if you think of how nicely generic functions and types can be 
defined in modern functional languages it might be worth it. There is no way 
you can match the level of abstraction in any imperative language.

As I mentioned in another mail, however, it also is an architecture dependent 
way of programming; much like C. (Saying this I am not referring to those 
problems which have a sequential nature)


- -- 
Eray Ozkural (exa) <>
Comp. Sci. Dept., Bilkent University, Ankara
GPG public key fingerprint: 360C 852F 88B0 A745 F31B  EA0F 7C07 AE16 874D 539C
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see