caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Rich Neswold <rich.neswold@gmail.com>
To: yminsky@gmail.com
Cc: Inria Ocaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Preventing values from escaping a context
Date: Tue, 9 Feb 2010 11:16:38 -0600	[thread overview]
Message-ID: <14cf844b1002090916m7cd2bc27pf189edbd7f7ddf51@mail.gmail.com> (raw)
In-Reply-To: <891bd3391002081959i4f9b70d4re1914ad7e439b5e3@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1347 bytes --]

On Mon, Feb 8, 2010 at 9:59 PM, Yaron Minsky <yminsky@gmail.com> wrote:

> On Mon, Feb 8, 2010 at 10:07 PM, Rich Neswold <rich.neswold@gmail.com>wrote:
>
>> (I realize that making this context a monad is a legitimate solution.
>> However, until I see the Ocaml community including monads in the standard
>> library, I think I'll stick with idiomatic Ocaml. I'd also like to solve
>> this functionally, so I'm discounting the use of objects. Sorry for these
>> constraints!)
>>
>
> I don't know that monads solve your problem here, but monads are a
> perfectly reasonable idiom in OCaml.  You won't find them in the standard
> library because the standard library is very conservative.  But you will
> find them in Jane Street's Core library, and we use them reasonably often.
> I think there's no reason to avoid monads in OCaml (although obviously
> there's not much to be gained by using them for vanilla effects, as is done
> in Haskell.)
>

I've used monads in Haskell to "hide" a parameter, so I may be able to do
the same for this case. Since I think I'm also going to use the Lwt library,
which is monadic, I wouldn't be setting the precedent.

Thanks, I'll also look into adding Jane Street's Core library to my
installation.

-- 
Rich

Google Reader: https://www.google.com/reader/shared/rich.neswold
Jabber ID: rich@neswold.homeunix.net

[-- Attachment #2: Type: text/html, Size: 2124 bytes --]

  reply	other threads:[~2010-02-09 17:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-09  3:07 Rich Neswold
2010-02-09  3:38 ` [Caml-list] " Jacques Garrigue
2010-02-09  8:24   ` Miles Sabin
2010-02-09  8:43     ` Jacques Garrigue
2010-02-09 17:18     ` Rich Neswold
2010-02-09  8:31   ` Tiphaine Turpin
2010-02-09 18:09     ` Rich Neswold
2010-02-09 18:45       ` Tiphaine Turpin
2010-02-10  0:39         ` Rich Neswold
2010-02-10  8:55           ` Goswin von Brederlow
2010-02-10 18:00             ` Rich Neswold
2010-02-10 21:37               ` Goswin von Brederlow
2010-02-09 17:13   ` Rich Neswold
2010-02-09  3:59 ` Yaron Minsky
2010-02-09 17:16   ` Rich Neswold [this message]
2010-02-11 10:39   ` Alexey Rodriguez
2010-02-11 11:05     ` rossberg
2010-02-11 13:52       ` Alexey Rodriguez
2010-02-11 15:17         ` rossberg

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=14cf844b1002090916m7cd2bc27pf189edbd7f7ddf51@mail.gmail.com \
    --to=rich.neswold@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=yminsky@gmail.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).