On Wed, Nov 24, 2010 at 11:06 AM, Michael Ekstrand <mich...@elehack.net> wrote: > On 11/24/2010 03:33 AM, Martin DeMello wrote: >> On Wed, Nov 24, 2010 at 4:36 AM, Jacques Garrigue >> <garri...@math.nagoya-u.ac.jp> wrote: >>> I'm not sure which examples you looked at for lablgtk2. >>> The goals of lablgtk are: >>> * be as close as possible to the spirit of Gtk+ >>> * while providing type and memory safety >>> * and allow comfortable use through objects and optional arguments
>> >> That might be the problem, then. I was looking at the examples in the >> translation of the gtk tutorial, and a lot of it seemed like C code >> translated to OCaml. Could you point me to some example of code >> written using the high level API? > > The LablGTK tutorial I am aware of[1] uses the high-level API. The > high-level API isn't notably higher-level than the base API in terms of > what calls are necessary, but it wraps everything up in objects and > makes the data structures nicer. The API call sequences are roughly the > same. > > - Michael > > 1. http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk.html > It's a design decision. As the author of LablGTK said above, one of its goals was to stay as close to possible as the original C API. This has advantages (easy to transfer knowledge and documentation to the OCaml side), and disadvantages (you miss on providing a nicer API that would be possible with a more expressive language). In the end the LablGTK API is only a bit nicer than the C API, so the GUI part of a LablGTK program would be similar to the equivalent C version. Unfortunately if you want a higher-level GUI library, I don't see any viable alternative in OCaml right now. -- []s, Andrei Formiga _______________________________________________ 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