Re: [Caml-list] Difference between ocamlc and ocamlopt when marshalling reference

2010-06-02 Thread Fabrice Le Fessant
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

Re: [Caml-list] Questions concerning modules as first-class values

2010-06-02 Thread Alain Frisch
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

Re: [Caml-list] Questions concerning modules as first-class values

2010-06-02 Thread Dario Teixeira
Hi, > I disagree with your terminology. Below is the one I use: > > -- > |          | 0-arity     | n-arity (n>0) | > -- > | Value    | constant    | function      | > |         |             |         | > | Mod

Re: [Caml-list] Questions concerning modules as first-class values

2010-06-02 Thread Julien Signoles
Hello, 2010/6/2 Dario Teixeira > - > | | 0-arity | n-arity (n>0) | > - > | Valueish | value | function | > | | | | > | M

[Caml-list] Questions concerning modules as first-class values

2010-06-02 Thread Dario Teixeira
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

[Caml-list] LPAR-17 extended submission deadlines

2010-06-02 Thread Geoff Sutcliffe
The 17th International Conference on Logic for Programming, Artificial Intelligence and Reasoning Yogyakarta, Indonesia

[Caml-list] Difference between ocamlc and ocamlopt when marshalling reference

2010-06-02 Thread Mathias Kende
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