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 9FF55BBAF for ; Wed, 24 Nov 2010 23:32:06 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjwBAPIg7UzRVdg0kGdsb2JhbACjAQgVAQEBAQkJDAcRAx+kJIlkghiFFi6IVgEBAwWFQgSKYA X-IronPort-AV: E=Sophos;i="4.59,250,1288566000"; d="scan'208";a="89300959" Received: from mail-qw0-f52.google.com ([209.85.216.52]) by mail1-smtp-roc.national.inria.fr with ESMTP; 24 Nov 2010 23:32:06 +0100 Received: by qwe4 with SMTP id 4so256621qwe.39 for ; Wed, 24 Nov 2010 14:32:05 -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:cc:content-type :content-transfer-encoding; bh=19QGGhzIwW3bqIJxth903M5CbWWRWI7ONib7BROvbiQ=; b=Kf101G14wPwPgIXHqZXime0XB1nb8HVPiSboGlBjs0TTUYLQfJCiVq2DDWWnHxg6Nz GOacAvWa1nGvWs9YIOYLRX1hPGRKUgKFsrRoUO9g1uigHsDVrc6qKB8hbu5V7UB5aJCB WubKXjEgPL/gNXVmmORNFBt3thRxAnDw4M2Kc= 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 :cc:content-type:content-transfer-encoding; b=sdaIuIzeBIGsYZrerW2G5SDet/TXWAk5zT/C+TSsVWZg1QtfRKwCEyiDVYyI03oeVv j2adxz9drFdPWaxI4tzy494Jz4d/6BIHtuexeufXrQE4LRn5fYQ42iJHJSyEsY8zHzWL DSFMED7DI3UVScOJ0piUIRxKFyZjPSirllVAk= MIME-Version: 1.0 Received: by 10.229.247.68 with SMTP id mb4mr8194095qcb.151.1290637921332; Wed, 24 Nov 2010 14:32:01 -0800 (PST) Received: by 10.229.23.19 with HTTP; Wed, 24 Nov 2010 14:32:01 -0800 (PST) In-Reply-To: <4CED85B7.30803@lexifi.com> References: <4CEC4EF0.30805@lexifi.com> <4CED85B7.30803@lexifi.com> Date: Wed, 24 Nov 2010 22:32:01 +0000 Message-ID: Subject: Re: [Caml-list] Desktop GUI toolkits - current state of the art? From: Jeremy Yallop To: Alain Frisch Cc: OCaml List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; frisch:01 frisch:01 lexifi:01 recursive:01 recursion:01 pubs:01 wrote:01 rec:01 rec:01 caml-list:01 alain:01 alain:01 lazy:02 lazy:02 let:03 On 24 November 2010 21:37, Alain Frisch wrote: > Being able to write things like: > > lazy let rec button1 =3D > =A0button ~click:(fun () -> button2 # disable) "Button1" > and button2 =3D > =A0button ~click:(fun () -> button1 # disable) "Button2" > in > ... > > > As the lazy keyword suggests, we rely on lazy evaluation to evaluate such > recursive definitions. The code above is equivalent to: > > let rec button1 =3D > =A0lazy (button ~click:(fun () -> (Lazy.force button2) # disable) "Button= 1") > and button2 =3D > =A0lazy (button ~click:(fun () -> (Lazy.force button1) # disable) "Button= 2" > in > ... This sounds very much like the presentation of value recursion in Don Syme's ML 2005 paper: http://research.microsoft.com/apps/pubs/default.aspx?id=3D79951 Out of interest, is your extension based on Don's work?