[MLton-user] FFI and finalizable values

Vesa A Norrman vnorrman@cc.hut.fi
Sun, 14 Dec 2003 21:49:20 +0200 (EET)


Hello, I'd like to be able to write, for example:
val c_function = _import "c_function" : Pointer.t Finalizable.t ->
unit;
The benefit would be less typing. For example,
withValue (x, c_function)
could be written
c_function x
Actually, that's not so bad, but it's worse if a function has many
parameters, for example:
withValue (x, fn x => withValue (y, fn y => c_function (x, y)))
What do you think of this? I think this is unnecessary extra sugar, but
it would definately make programming easier and faster.
Vesa