[wg-camlp4] My uses of syntax extension
Leo White
lpw25 at cam.ac.uk
Tue Jan 29 14:47:38 GMT 2013
On Jan 29 2013, Jeremy Yallop wrote:
>On 29 January 2013 14:17, Leo White <lpw25 at cam.ac.uk> wrote:
>> You are making an arbitrary distinction between functions and other
>> values.
>
>Actually, this has nothing at all to do with functions.
>
>The "tl;dr" is: syntax extensions are about notation, while quotations
>are about distinguishing using and mentioning.
>
The difference between using and mentioning is fairly philosophical.
As far as I'm concerned <:expr < 3 + 4 >> is simply a syntactic short hand
for something like AstPlus(AstConstInt 3, AstConstInt 4). That fact that
these constructors in some way refer to another thing is not particularly
relevant.
My point about functions was that you seemed to be defining "using" as
executing, which is obviously only possible for a quotation that represents
OCaml functions.
More information about the wg-camlp4
mailing list