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 0C2B3BC69 for ; Thu, 18 Oct 2007 15:26:00 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAN37FkfUnw7Xi2dsb2JhbACCOIwWAgEIBAYPGoEn X-IronPort-AV: E=Sophos;i="4.21,295,1188770400"; d="scan'208";a="4716616" Received: from fhw-relay07.plus.net ([212.159.14.215]) by mail3-smtp-sop.national.inria.fr with ESMTP; 18 Oct 2007 15:25:59 +0200 Received: from [80.229.56.224] (helo=beast.local) by fhw-relay07.plus.net with esmtp (Exim) id 1IiVNv-0002au-15 for caml-list@yquem.inria.fr; Thu, 18 Oct 2007 14:25:59 +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 14:17:20 +0100 User-Agent: KMail/1.9.7 References: <200710181325.30668.jon@ffconsultancy.com> <4717544B.3040000@lix.polytechnique.fr> In-Reply-To: <4717544B.3040000@lix.polytechnique.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710181417.20870.jon@ffconsultancy.com> X-Spam: no; 0.00; haskell:01 fpls:01 frog:98 wrote:01 arnaud:01 caml-list:01 lazy:02 lazy:02 data:02 structures:02 implemented:02 match:02 pattern:04 pattern:04 generally:04 On Thursday 18 October 2007 13:40:43 Arnaud Spiwack wrote: > > 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. > > Which might simply need to have a support for views, wouldn't it ? Yes. F# provides pattern matching over lazy lists using exactly that technique and views are more generally useful when dissecting data structures held in foreign formats without copying them. However, implementing views is probably a lot harder than just implementing pattern matching over lazy values. I suspect pattern matching over lazy values could be implemented much more efficiently that the more general case of views. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e