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 _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs