From: "Stéphane Glondu" <steph@glondu.net>
To: Elnatan Reisner <elnatan@cs.umd.edu>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Pervasives.compare != Pervasives.compare
Date: Fri, 12 Nov 2010 11:50:39 +0100 [thread overview]
Message-ID: <4CDD1BFF.2050704@glondu.net> (raw)
In-Reply-To: <A535C303-8106-4332-BDBA-3AF5247A5ED4@cs.umd.edu>
Le 12/11/2010 06:57, Elnatan Reisner a écrit :
> Playing around a bit more, I seemed to find that every time you access
> an 'external' function, you get a distinct reference (is there a better
> term?) to it. This seems a bit odd to me. Can someone explain?
Think of externals as constructors: they are always fully applied
internally. So when you partially apply one (or use it with no
arguments), the compiler eta-expands it and generates a closure that
eats the remaining arguments and call the external.
You can use the -dinstr (in bytecode) or -S (in native code)
command-line switch to see how things are actually compiled.
Cheers,
--
Stéphane
prev parent reply other threads:[~2010-11-12 10:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-12 5:57 Elnatan Reisner
2010-11-12 10:50 ` Stéphane Glondu [this message]
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=4CDD1BFF.2050704@glondu.net \
--to=steph@glondu.net \
--cc=caml-list@yquem.inria.fr \
--cc=elnatan@cs.umd.edu \
/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