Browse thread
Configuring emacs to work with caml
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2010-01-17 (08:24) |
From: | blue storm <bluestorm.dylc@g...> |
Subject: | Re: [Caml-list] A syntax extension to simplify List manipulation |
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