From: D Herring on
namekuseijin wrote:

> why do you need monads in a language with full state? I'd rather have
> lazy Lisp instead.

Would you be willing to write an informal review comparing clazy with
heresy?

http://common-lisp.net/project/clazy/
http://cl-heresy.sourceforge.net/Heresy.htm

Thanks,
Daniel
From: dsorokin on
> This does indeed generate the code in a generic way; i.e. the generated code
> fetches the representative CLOS instance for the STATE-XFORM-MONAD class and
> uses it to do dispatch.  But this is just a code generation choice that could
> be changed.  For instance, the macro could instead look up STATE-XFORM-MONAD in
> a hash table and actually statically pull out the names of functions to
> substitute into the generated code.

Kaz,

I think that namely this dispatching (through CLOS) is slow. But the
same dispatching allows you to easily create and debug monad
transformers. This is a weak and strong side of your method at the
same time. I don't know how it would be possible to write the monad
transformers if the dispatching was statical (in absence of the type
classes in the language).

In my method there is no dispatching at all. But as a result, the
monad transformers become a very subtle and complicated task.

By the way, I think we could create converters for our methods. For
example, I can write a converter that would create automatically my
monad macro by specified your monad. I guess that the inverted
converter can be written as well. Did you create a project which I
could refer to?

Thanks
David
From: dsorokin on
> why do you need monads in a language with full state?  I'd rather have
> lazy Lisp instead.

For example, I personally need monads to model dynamic processes in
System Dynamics. Such a process can be defined as a variation of the
Reader monad. It allows me to define many tasks of System Dynamics
declaratively.

By the way, there are monads (workflows) in F#. This is also a
"language with full state".