From: "Milan Stanojević" <milanst@gmail.com>
To: Alain Frisch <alain@frisch.fr>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] empty mli for executable
Date: Thu, 3 Oct 2013 14:42:31 -0400 [thread overview]
Message-ID: <CAKR7PS9SBXJUak76btS63C8Avk5yWo=8ZnrNfdv2-XLmU8zbdg@mail.gmail.com> (raw)
In-Reply-To: <524DAD23.7070206@frisch.fr>
> The empty interface implies that toplevel values computed by those modules
> don't need to be stored in the global symbol slots. Those slots are roots
> for the GC and are thus scanned every time it runs. The fewer global
> symbols, the quicker the GC will be. Well, this is the theory, I'd be
> really surprised if this materialized in a speed up which can be observed.
Thanks, Alain.
Just one question about this. Let's say I have a toplevel value in my
executable and an empty mli. How is this toplevel value then retained?
Is it part of some other root set ?
> Having an empty interface has a much more practical interest, in general: it
> allows the compiler to detect unused declarations in the implementation (if
> the corresponding warnings are enabled), and thus to reduce code rot.
Yes, I've been doing this, it is a very useful feature of the compiler.
next prev parent reply other threads:[~2013-10-03 18:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-03 16:50 Milan Stanojević
2013-10-03 17:45 ` Alain Frisch
2013-10-03 18:42 ` Milan Stanojević [this message]
2013-10-03 20:52 ` Alain Frisch
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='CAKR7PS9SBXJUak76btS63C8Avk5yWo=8ZnrNfdv2-XLmU8zbdg@mail.gmail.com' \
--to=milanst@gmail.com \
--cc=alain@frisch.fr \
--cc=caml-list@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