caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Markus Mottl <markus@oefai.at>
To: james woodyatt <jhw@wetware.com>
Cc: The Trade <caml-list@inria.fr>
Subject: Re: [Caml-list] Re: variance, subtyping and monads... oh, my!
Date: Mon, 19 Nov 2001 10:58:42 +0100	[thread overview]
Message-ID: <20011119105842.A29501@chopin.ai.univie.ac.at> (raw)
In-Reply-To: <2B0C11B2-DCCC-11D5-B196-000502DB38F5@wetware.com>; from jhw@wetware.com on Mon, Nov 19, 2001 at 01:02:33 -0800

On Mon, 19 Nov 2001, james woodyatt wrote:
> On Monday, November 19, 2001, at 12:11 , Francois Pottier wrote:
> > Isn't that a bit harsh?
> 
> Maybe.  I'm more of a developer than a researcher.  As with any 
> research, it's not useful to me until I know how and why to apply it.

Even in OCaml people sometimes decide to apply monads. Just take a look
at the FFTW-library, whose code generator is implemented in OCaml:

  http://www.fftw.org

The simplification engine for DAGs used there represents rewrite rules
with monad operators. This way they "look" as if they were normal
tree-rewrite rules, whereas in fact the monad operators hide the whole
graph rewriting that happens "behind the scene". I could surely imagine
other, maybe even more efficient ways of doing it, but I fear it will be
difficult to find anything that is only closely as elegant (and easily
verifiable!).

> If by using monads, on the other hand, I can do something easily that 
> would otherwise be very awkward, then I'm sold.  So far, I have only 
> found examples of how to do things I can already do better with the 
> imperative and object-oriented styles in OCaml.

Objects are useful abstractions for states, whereas monads are
abstractions of computations (i.e. state transformations, like e.g.
rewriting steps as above). These two things solve different problems so
it wouldn't make much sense saying that one is "better" than the other.

Regards,
Markus Mottl

-- 
Markus Mottl                                             markus@oefai.at
Austrian Research Institute
for Artificial Intelligence                  http://www.oefai.at/~markus
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


  reply	other threads:[~2001-11-19 12:46 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-16 19:37 [Caml-list] [Q]: Co(ntra)variance and subtyping? Clemens Hintze
2001-11-17 14:18 ` Mark Wotton
2001-11-17 14:55   ` Mark Wotton
2001-11-17 17:50   ` [Caml-list] " Clemens Hintze
2001-11-17 23:17     ` Mark Wotton
2001-11-18  9:16       ` Clemens Hintze
2001-11-18 13:18         ` Alain Frisch
2001-11-19  9:54           ` Remi VANICAT
     [not found]       ` <9t7v4d$gij$1@qrnik.zagroda>
2001-11-18 11:57         ` Marcin 'Qrczak' Kowalczyk
2001-11-18 13:34 ` [Caml-list] " Andreas Rossberg
2001-11-18 21:22   ` Pixel
2001-11-19  0:33     ` Jacques Garrigue
2001-11-18 22:35       ` David Gurr
2001-11-19  7:24         ` [Caml-list] " Clemens Hintze
2001-11-19 12:03           ` Markus Mottl
2001-11-19  8:29         ` [Caml-list] " Xavier Leroy
2001-11-19 11:03       ` Alain Frisch
2001-11-20  9:58         ` Didier Remy
2001-11-19 11:14       ` Pixel
2001-11-18 22:30   ` [Caml-list] Re: variance, subtyping and monads... oh, my! james woodyatt
2001-11-19  8:11     ` Francois Pottier
2001-11-19  9:02       ` james woodyatt
2001-11-19  9:58         ` Markus Mottl [this message]
2001-11-19 20:47           ` james woodyatt
2001-11-19 12:56       ` Frank Atanassow
2001-11-19 10:39     ` Andreas Rossberg
2001-11-19 12:21       ` Markus Mottl
2001-11-19 13:43         ` [Caml-list] Kylix and OCaml Christophe Raffalli
2001-11-20  2:05           ` Vitaly Lugovsky
2001-11-20  8:51             ` Christophe Raffalli
2001-11-22  1:42               ` Vitaly Lugovsky
2001-11-20 10:00             ` Benjamin Monate
2001-11-20 10:24               ` [Caml-list] [Bug in an interface between C++ and OCAML due to some pointer encapsulation] Sylvain Kerjean
2001-11-20 12:14             ` [Caml-list] Kylix and OCaml Maxence Guesdon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011119105842.A29501@chopin.ai.univie.ac.at \
    --to=markus@oefai.at \
    --cc=caml-list@inria.fr \
    --cc=jhw@wetware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).