From: Michel.Mauny@inria.fr (Michel Mauny)
To: ddr@peray.inria.fr (Daniel de Rauglaudre)
Cc: caml-list@pauillac.inria.fr, coq@pauillac.inria.fr
Subject: Re: Quotations in Caml-Special-Light and Caml-Light
Date: Fri, 17 Nov 1995 17:29:12 +0100 (MET) [thread overview]
Message-ID: <199511171629.RAA25588@pauillac.inria.fr> (raw)
In-Reply-To: <199511171358.AA28851@peray.inria.fr> from "Daniel de Rauglaudre" at Nov 17, 95 02:52:03 pm
Just a few more informations, following Daniel's message about
quotations.
First, as I said in an earlier message, macros (in the sense of
Scheme) and quotations aren't exactly the same thing. Scheme-like
macros provide arbitrary computations, returning values of arbitrary
types. In a strongly-typed language such as ML, one must make sure
that macro expansions return pieces of program, therefore a (general)
implementation of macros implies some form of dynamic type-checking.
On the other hand, quotations are guaranteed to return pieces of
program: ML abstract syntac trees, in our previous work, and character
strings in the implementation described by Daniel. In this latter
implementation, the type-correctness of expanded quotations (checking
that these strings represent valid pieces of program) is guaranteed by
the ML parser, which raises a syntax error or accepts the expanded
quotation as input.
For the sake of simplicity, Daniel, in his message, considered only a
simple case of usage of quotations. Quotations are indeed much more
powerful that this. I won't bother you with complex examples here,
but, if interested, a few interesting examples are described in a
paper by Daniel and myself (reference below). In this paper, the
expansion of quotations returns ML abstract syntac trees, making the
system a bit more complex than when expansions return strings. Despite
this small difference, the whole mechanism, together with different
implementation possibilities and examples, are given in the paper.
The paper is available from:
ftp://ftp.inria.fr/INRIA/Projects/cristal/MLworkshop94/08-mauny.ps.Z
and here is the bibtex reference:
@InProceedings{Mauny-de-Rauglaudre94a,
author = "Michel Mauny and Daniel de Rauglaudre",
title = "A complete and realistic implementation of
quotations for {ML}",
booktitle = "Record of the 1994 {ACM-SIGPLAN} Workshop on
{ML} and its Applications",
page = "70--78",
month = jun,
year = 1994
}
Cheers,
--
Michel
next parent reply other threads:[~1995-11-17 17:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <199511171358.AA28851@peray.inria.fr>
1995-11-17 16:29 ` Michel Mauny [this message]
1995-11-17 13:52 Daniel de Rauglaudre
1995-11-17 14:15 ` Pierre Weis
1995-11-17 14:25 ` Daniel de Rauglaudre
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=199511171629.RAA25588@pauillac.inria.fr \
--to=michel.mauny@inria.fr \
--cc=caml-list@pauillac.inria.fr \
--cc=coq@pauillac.inria.fr \
--cc=ddr@peray.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