Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] tiny syntactic convenience suggestion
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: STARYNKEVITCH Basile <Basile.Starynkevitch@c...>
Subject: [Caml-list] tiny syntactic convenience suggestion
Hello All,

For top level bindings to be used by C code I suggest a syntactic

  let external "fooname" foo = bigexpr;;

would be equivalent to 

  let foo = bigexpr;
  Callback.register "fooname"  foo;;

Perhaps even we could have

  let external foo = bigexpr;;

equivalent to 

  let external "foo" foo = bigexpr;;
I know that this is not perfectly orthogonal (e.g. w.r.t. Ocaml module
system) but I believe it would be a useful feature for novice users
using Ocaml as a scripting langage embedded in an existing application

N.B. Any opinions expressed here are only mine, and not of my organization.
N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA.

Basile STARYNKEVITCH   ----  Commissariat à l Energie Atomique * France
DRT/LIST/DTSI/SLA * CEA/Saclay b.528 (p111f) * 91191 GIF/YVETTE CEDEX 
phone:+33 1,6908.6055; fax: 1,6908.8395 home: 1,4665.4553; mobile: 6,8501.2359
work email: Basile point Starynkevitch at cea point fr 
home email: Basile at Starynkevitch point net

Bug reports:  FAQ:
To unsubscribe, mail  Archives: