From: blue storm <bluestorm.dylc@gmail.com>
To: Alexander Voinov <avoinov@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] A syntax extension to simplify List manipulation
Date: Sun, 17 Jan 2010 09:24:10 +0100 [thread overview]
Message-ID: <527cf6bc1001170024r1e74b0dal38c92924037f2788@mail.gmail.com> (raw)
In-Reply-To: <003801ca9702$a72e2b30$f58a8190$@com>
Thanks for the release : it's interesting to see syntax extensions in use.
I have a few question/remarks.
1) Are you interested in a camlp4 (>= 3.10) port ?
2) The use of the Extlib module is hardcoded in the syntax extension.
I would find it nicer if you only referred to "List.map" instead of
"Extlib.List.map", and let the user "open Extlib" if he wants to
override the stdlib. That would allow one to use other implementations
of List.
You could also add an option to use "List.map" instead of
"Extlib.List.map", if you want Extlib to be the default.
3) iterate/iteratei use a closing "done" lexeme. I understand that it
was nicer for use in a ;-sequence, but doesn't it somehow break the
homogeneity with the "match .. with" construct ?
4) It could be interesting to parametrize the syntax extension of the
precise collection module used. In my own pa_comprehension [1]
extension, i use "Module : expression" (in you setting that would be
something like "map Array : e with ...") for that purpose. You could
instead choose to make the used module implicit (expand to "map"
instead of "List.map" or "Extlib.List.map"), and let an external
openin-like facility do the job. As I understand an open_in syntax is
going to be included in the mainstream for 3.12, that's probably the
best solution.
[1] http://git.ocamlcore.org/cgi-bin/gitweb.cgi?p=batteries/batteries.git;a=blob;f=src/syntax/pa_comprehension/README;h=e17aa35b72a54d7db28c5f8b8dcb19ed40df1b68;hb=HEAD
next prev parent reply other threads:[~2010-01-17 8:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-16 22:33 Configuring emacs to work with caml C. Fr
2010-01-16 23:21 ` A syntax extension to simplify List manipulation Alexander Voinov
2010-01-17 8:24 ` blue storm [this message]
2010-01-25 17:42 ` [Caml-list] " Damien Doligez
2010-01-25 21:45 ` Alexander Voinov
2010-01-25 22:32 ` blue storm
2010-01-26 0:14 ` Alexander Voinov
2010-01-26 0:39 ` blue storm
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=527cf6bc1001170024r1e74b0dal38c92924037f2788@mail.gmail.com \
--to=bluestorm.dylc@gmail.com \
--cc=avoinov@gmail.com \
--cc=caml-list@yquem.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