caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* osx caml bindings?
@ 2006-02-18 21:49 Brendan Miller
  0 siblings, 0 replies; only message in thread
From: Brendan Miller @ 2006-02-18 21:49 UTC (permalink / raw)
  To: caml-list

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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-02-18 21:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-18 21:49 osx caml bindings? Brendan Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).