From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: Edgar Friendly <thelema314@gmail.com>
Cc: bluestorm.dylc <bluestorm.dylc@gmail.com>,
caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] small Camlp4 code : get a free name
Date: Sat, 09 Feb 2008 20:01:24 +0100 [thread overview]
Message-ID: <1202583570-sup-2693@ausone.local> (raw)
In-Reply-To: <4797B314.8040008@gmail.com>
Excerpts from Edgar Friendly's message of Wed Jan 23 22:35:16 +0100 2008:
> Martin Jambon wrote:
> > Nice, but in theory, it may create identifiers that are bound to an
> > incorrect value when the programmer forgot to define such a value.
> >
> > For example, module A should provide A.x to module B (= another .ml file).
> > If the programmer forgets to define A.x, the compiler should report the
> > error at the time of compiling b.ml. But if some camlp4 extension
> > operating over a.ml introduces a variable A.x and by chance it has the
> > same type as the expected A.x, then the compiler will remain silent and
> > B will use the wrong value for A.x.
> >
> >
> > Martin
> >
> It seems to me that the only way to satisfy this requirement involves a
> distinct namespace for these variables. Maybe
> Camlp4.Unique_identifiers.<generated identifier>?
You cannot always use the dot notation. For instance <<let
Camlp4.Unique_identifiers.x = e1 in e2 >> would be wrong.
> But this seems isomorphic to the simpler solution of claiming a portion
> of the identifier space: __camlp4_unique_identifier_<generated identifier>.
Yes that's the poor man fresh function.
Best regards,
--
Nicolas Pouillard aka Ertai
next prev parent reply other threads:[~2008-02-09 19:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-23 19:59 blue storm
2008-01-23 20:30 ` [Caml-list] " Martin Jambon
2008-01-23 21:35 ` Edgar Friendly
2008-02-09 19:01 ` Nicolas Pouillard [this message]
2008-02-09 19:13 ` Nicolas Pouillard
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=1202583570-sup-2693@ausone.local \
--to=nicolas.pouillard@gmail.com \
--cc=bluestorm.dylc@gmail.com \
--cc=caml-list@yquem.inria.fr \
--cc=thelema314@gmail.com \
/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