Hi,
The main difference is that "p" is a closure in bytecode, but just a
pointer in native code: in bytecode, "p" references "r", and so a
closure is needed; in native code, the reference to "r" in "p" is a
direct access to the module structure, and so "p" does not need to keep
a reference to "r
On 06/02/2010 03:43 PM, Julien Signoles wrote:
If I well understood what Alain Frisch and Xavier Leroy explained,
modules (including both structures and functors) become first class
value: structures may be converted to records and functors to functions;
and conversely. But I let more informed pe
Hi,
> I disagree with your terminology. Below is the one I use:
>
> --
> | | 0-arity | n-arity (n>0) |
> --
> | Value | constant | function |
> | | | |
> | Mod
Hello,
2010/6/2 Dario Teixeira
> -
> | | 0-arity | n-arity (n>0) |
> -
> | Valueish | value | function |
> | | | |
> | M
Hi,
3.12 will bring modules as first-class values to the Ocaml language.
This is an interesting development whose full range of applications will
surprise us for many years, I suspect. It also raises a few questions,
two of which I'll throw to the audience.
The first is purely one of terminolo
The 17th International Conference on
Logic for Programming, Artificial Intelligence and Reasoning
Yogyakarta, Indonesia
Hi,
I found a difference on the way global references used inside a function
are handled with respect to marshalling between ocamlc and ocamlopt.
See the exemple below :
-- a.ml ---
let r = ref 0
let p () = Printf.printf "%d\n" !r
let s = Marshal.to_string p [Marshal.Clos