From: "Jacques Carette" <carette@mcmaster.ca>
To: Jacques Carette <carette@mcmaster.ca>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] First order compile time functorial polymorphism in Ocaml
Date: Tue, 24 Jun 2003 10:34:44 -0400 [thread overview]
Message-ID: <web-44933666@cgpsrv1.cis.mcmaster.ca> (raw)
In-Reply-To: <3EF847E2.1010501@ozemail.com.au>
John Max Skaller <skaller@ozemail.com.au> wrote:
> Jacques Carette wrote:
> Curious: how useful? How many times did you reuse it?
I've used generic_traverse in a dozen places, and will likely use it more often.
> Its a hack yes, looks ugly :(
Oh, fully agreed! The point of posting it was to get some constructive criticism in the hopes of being able to do
better.
> Perhaps can do better with polymorphic variants.
My first prototype (which got wiped out in some disk crash) did use polymorphic variants. I decide to not use them
again to see if I really needed them. And perhaps I do.
> Ugly separating the filter
> for the special actions from those actions:
Very much so, but I found the combined filter/action routines even harder to read, with more code duplication than I
could swallow!! So I used this 2-stage approach.
> Uggh. Like to be writing something like
> | `Mlist args -> ..
> | `Mseq args -> ..
> | _ -> ..
I will re-explore this.
> or perhaps
> | #usual_case ->
> instead of the last line if there happens to be
> a type partition matching the requirements.
I read about #types in the Ocaml manual. Are you referring to using classes or the (documented obsolete) expansion of
variant types ?
Even though S. Boulmé, Th. Hardin, and R. Rioboo in
"Polymorphic Data Types, Objects, Modules and Functors: is it too much ?" (see
http://www.lip6.fr/reports/lip6.2000.014.html) argue quite cogently about the use of the full power of Ocaml for doing
mathematics [my real goal], I was hoping that for writing a language interpreter I did not need to go that far.
Jacques
-------------------
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
next prev parent reply other threads:[~2003-06-24 14:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-22 18:25 John Skaller
2003-06-22 19:03 ` Michal Moskal
2003-06-23 3:52 ` John Max Skaller
2003-06-23 9:58 ` Michal Moskal
2003-06-23 10:27 ` Markus Mottl
2003-06-23 10:35 ` Michal Moskal
2003-06-23 10:08 ` Markus Mottl
2003-06-23 8:07 ` Francois Rouaix
2003-06-23 9:03 ` Roberto Di Cosmo
2003-06-23 17:37 ` John Max Skaller
2003-06-23 9:03 ` Jun.Furuse
2003-06-23 17:53 ` John Max Skaller
2003-06-23 18:02 ` Jacques Carette
2003-06-24 1:00 ` Jacques Garrigue
2003-06-24 12:45 ` John Max Skaller
2003-06-24 14:34 ` Jacques Carette [this message]
2003-06-24 23:45 ` Jacques Garrigue
2003-06-25 2:27 ` John Max Skaller
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=web-44933666@cgpsrv1.cis.mcmaster.ca \
--to=carette@mcmaster.ca \
--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