On Sat, Nov 27, 2010 at 12:39 AM, Yoann Padioleau <pada...@wanadoo.fr> wrote: > On Nov 24, 2010, at 1:38 AM, Martin DeMello wrote: >> >> Both ruby and vala make an effort to provide nice syntactic support >> for gtk code, so that it looks like a natural part of the language. > > Could you give some example of code explaining that ? > Code in vala/ruby vs same code in lablgtk.
Here's the table packing example in ruby and ocaml: http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-packing-tables-demo http://plus.kaist.ac.kr/~shoh/ocaml/lablgtk2/lablgtk2-tutorial/x509.html They both more or less follow the C API, but the ruby code looks like natural ruby (perhaps because ruby has a more imperative flavour than OCaml does), whereas the OCaml code looks there should be a more declarative, higher-level way of doing things. Vala is currently experimenting with gtkon, a declarative layout language that embeds vala code "islands", and is compiled into pure vala by a preprocessor. http://code.google.com/p/gtkaml/wiki/Gtkon This seems like a very promising direction, though I don't know how well an equivalent approach would work in OCaml. martin _______________________________________________ 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