caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Yaron M. Minsky" <yminsky@cs.cornell.edu>
To: Caml List <caml-list@inria.fr>
Subject: Why are functors better? (Re: [Caml-list] Map efficiency?)
Date: Fri, 07 Nov 2003 06:39:41 -0500	[thread overview]
Message-ID: <1068205181.30150.12.camel@dragonfly.localdomain> (raw)
In-Reply-To: <16299.22375.433305.104788@gargle.gargle.HOWL>

On Fri, 2003-11-07 at 03:27, Jean-Christophe Filliatre wrote:
> [ Some discussion of methods for building maps without functors ]
>
> (But the functorial interface is definitely the best, of course.)

I don't understand this perspective at all.  Functors seem like a fairly
problematic corner of the language.  In this case, except for some
possible efficiency issues, it seems clear that a non-functorial map is
preferable, for simplicity and ease-of-use issues, and performance
aside, I can't see much to recommend the current functorial approach.

Functors would be a lot more useful if they could be used as a
large-scale structural tool.  Sadly, the current implementation makes
this quite difficult, since there's no good way of parameterizing
multiple modules at once (as noted in a previous thread.  See

http://groups.google.com/groups?q=group%3Afa.caml+functors+yminsky&ie=UTF-8&oe=UTF-8&hl=en&btnG=Google+Search

for details.)  For most situations where you'd really need them, they're
not powerful enough.  And for the situations where they're powerful
enough, they're usually overkill.  Map and Set are examples where they
almost strictly get in the way.

y

-- 
|--------/            Yaron M. Minsky              \--------|
|--------\ http://www.cs.cornell.edu/home/yminsky/ /--------|

Open PGP --- KeyID B1FFD916
Fingerprint: 5BF6 83E1 0CE3 1043 95D8 F8D5 9F12 B3A9 B1FF D916



-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2003-11-07 11:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-04  7:59 [Caml-list] Map efficiency? Dustin Sallings
2003-11-04  9:11 ` Jean-Christophe Filliatre
2003-11-04 10:00   ` Richard Jones
2003-11-04 19:58   ` Issac Trotts
2003-11-04  9:39 ` Christian Lindig
2003-11-04 18:14   ` Alex Baretta
2003-11-05  1:09     ` Nicolas Cannasse
2003-11-07  8:27     ` Jean-Christophe Filliatre
2003-11-07 11:39       ` Yaron M. Minsky [this message]
2003-11-07 14:02         ` Why are functors better? (Re: [Caml-list] Map efficiency?) Michael Hicks
2003-11-07 14:08         ` Fernando Alegre
2003-11-07 14:49       ` [Caml-list] Map efficiency? Florian Hars
2003-11-04 19:37   ` Dustin Sallings

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=1068205181.30150.12.camel@dragonfly.localdomain \
    --to=yminsky@cs.cornell.edu \
    --cc=caml-list@inria.fr \
    /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).