Version française
Home     About     Download     Resources     Contact us    
Browse thread
Desktop GUI toolkits - current state of the art?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Martin DeMello <martindemello@g...>
Subject: Re: [Caml-list] Desktop GUI toolkits - current state of the art?
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

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