From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 74DF7BC69 for ; Thu, 18 Oct 2007 14:34:11 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CACLwFkfUnw7Xi2dsb2JhbACCOIwWAgEIBAYPGg X-IronPort-AV: E=Sophos;i="4.21,295,1188770400"; d="scan'208";a="4710373" Received: from fhw-relay07.plus.net ([212.159.14.215]) by mail3-smtp-sop.national.inria.fr with ESMTP; 18 Oct 2007 14:34:10 +0200 Received: from [80.229.56.224] (helo=beast.local) by fhw-relay07.plus.net with esmtp (Exim) id 1IiUZl-0006Jo-Jd for caml-list@yquem.inria.fr; Thu, 18 Oct 2007 13:34:09 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Help me find this pdf Date: Thu, 18 Oct 2007 13:25:30 +0100 User-Agent: KMail/1.9.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710181325.30668.jon@ffconsultancy.com> X-Spam: no; 0.00; haskell:01 fpls:01 frog:98 wrote:01 caml-list:01 functions:01 functions:01 lazy:02 lazy:02 implemented:02 match:02 primitive:02 pattern:04 laziness:05 i'd:06 On Thursday 18 October 2007 10:52:26 Tom wrote: > Not long ago I was searching the Internet on the topic "combining eager and > lazy evaluation", and have run over a paper which I obviously dismissed as > "not interesting enough", yet now I have realized that it could indeed be > useful, but am unable to find it. > > I know it was talking about a useful primitive, I do not know how exactly > it was named, which checked whether values passed as arguments to functions > were lazy (blocks to be evaluated) or eager (already evaluated), and using > it some functions, e.g. map (this example was present in the paper) could > be implemented to be both eager and lazy at the same time, depending on the > arguments. > > Does anyone recognize this description? Scala can do something similar by controlling evaluation simply by altering the signature. However, I've reviewed Haskell recently and I think complete laziness is more of a hindrance than a benefit. The only think I'd like to see added to eager FPLs is the ability to pattern match over lazy values, forcing them only when necessary. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e