From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 463CBBBAF for ; Wed, 24 Nov 2010 16:56:33 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuoBAF/E7EzRVdY0k2dsb2JhbACUd41+CBUBAQIJCQoJEQMfpD6JZIIYhSIuiFYBAQMFhUIEhROFTQ X-IronPort-AV: E=Sophos;i="4.59,248,1288566000"; d="scan'208";a="89279811" Received: from mail-bw0-f52.google.com ([209.85.214.52]) by mail1-smtp-roc.national.inria.fr with ESMTP; 24 Nov 2010 16:56:32 +0100 Received: by bwz4 with SMTP id 4so8350229bwz.39 for ; Wed, 24 Nov 2010 07:56:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=nowV7x3A4jZT9pud2DaWK9QU5QZGCrGw2TmQbhVGs5I=; b=bkAbqaOyNt7KRZPWL1Rxzv7f1QYi3hMX9VbMxS36PGhmzQPpQayyb2H7sYoGvQGoE8 WmYR9jOyBszOY3nQCz4j0JzAKIRL/akdG0rO5StXZC9i8N8eTcVPQroT4Vn1PM26gKSL Xk3HFtrO84aSKaX3KQ0C3+4vyLMmBh2f8qaiQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=m2xP6iOXXvxAsbG6FNFXL4NKxrpDZn/j3Q+b6kF24t6MzvEwuA145FbIm3F9yz4kKX 4rOgw9fUoNXQJ471vDDUoH49jwC1t28ZIoEZGgk3pEqSHJbI0VCNfz2facccIoGTCDPU 45AZxpFOjZOrwCz7Nq3tTpoAd0ZZRbu8Mb/Co= MIME-Version: 1.0 Received: by 10.204.64.139 with SMTP id e11mr8917817bki.212.1290614187437; Wed, 24 Nov 2010 07:56:27 -0800 (PST) Received: by 10.204.47.14 with HTTP; Wed, 24 Nov 2010 07:56:27 -0800 (PST) In-Reply-To: <4CED1BCA.3050606@elehack.net> References: <4CED1BCA.3050606@elehack.net> Date: Wed, 24 Nov 2010 12:56:27 -0300 Message-ID: Subject: Re: [Caml-list] Desktop GUI toolkits - current state of the art? From: Andrei Formiga To: caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 X-Spam: no; 0.00; formiga:01 formiga:01 lablgtk:01 lablgtk:01 gtk:01 gtk:01 translated:01 ocaml:01 high-level:01 high-level:01 higher-level:01 wwwfun:01 olabl:01 ocaml:01 higher-level:01 On Wed, Nov 24, 2010 at 11:06 AM, Michael Ekstrand wrote: > On 11/24/2010 03:33 AM, Martin DeMello wrote: >> On Wed, Nov 24, 2010 at 4:36 AM, Jacques Garrigue >> 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