Version française
Home     About     Download     Resources     Contact us    
Browse thread
osx caml bindings?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Brendan Miller <catphive.lists@g...>
Subject: osx caml bindings?
does anyone know if there are working caml cocoa bindings or caml
carbon bindings available? preferably cocoa bindings.

on a tangent, since objective-c has labeled arguments, it would be
cool if the binding recognized this and took a objective c method of
the form
doSomthingWith: (int)a and: (int)b and:(int)c

and turned it into the ocaml method
method doSomethingWith_and_and ~arg1 ~arg2 ~arg3

THEN a preprocessor could be used (I don't know much about caml4p,
hopefully it could do this) to regularly convert objective c style
calls in ocaml to the ocaml method call so that
[my_object doSomethingWith: a and: b and: c]

becomes
(my_object#doSomethingWith_and_and ~arg1:a ~arg2:b ~arg3: c)

the problem comes when you want to take advantage of the labeled
arguements to make a partial call. with the objective c syntax there
is ambiguity.

[my_object doSomethingWith: a]

could mean
(my_object#doSomethingWith_and_and ~arg1:a)

or it could mean
(my_object#doSomethingWith ~arg1:a)

and practically speaking cocoa has a lot of methods of that form... so
partial calls would maybe require that the ocaml call format is used.