Browse thread
Desktop GUI toolkits - current state of the art?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Yoann Padioleau <padator@w...> |
| Subject: | Re: [Caml-list] Desktop GUI toolkits - current state of the art? |
On Nov 27, 2010, at 10:38 PM, Martin DeMello wrote: > On Sat, Nov 27, 2010 at 12:39 AM, Yoann Padioleau <padator@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 I honestly don't see any difference. Where do you see "nice syntactic support for gtk code" in the ruby version ? > > 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, Again, I don't see the advantage of this JSON notation vs doing the same in plain OCaml. > though I don't know how > well an equivalent approach would work in OCaml. In https://github.com/facebook/pfff/blob/master/commons/gui.ml I've modified slightly the lablgtk API to be more compositional. > > martin