From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id DF912BCAE for ; Mon, 18 Jul 2005 17:40:13 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j6IFeDdl004473 for ; Mon, 18 Jul 2005 17:40:13 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA00708 for ; Mon, 18 Jul 2005 17:40:13 +0200 (MET DST) Received: from smtp12.wanadoo.fr (smtp12.wanadoo.fr [193.252.22.20]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j6IFeCIl000763 for ; Mon, 18 Jul 2005 17:40:12 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1207.wanadoo.fr (SMTP Server) with ESMTP id 8F17E1C000AB for ; Mon, 18 Jul 2005 17:40:12 +0200 (CEST) Received: from oemcomputer (Mix-Lyon-303-2-50.w193-248.abo.wanadoo.fr [193.248.44.50]) by mwinf1207.wanadoo.fr (SMTP Server) with SMTP id 520AD1C00043; Mon, 18 Jul 2005 17:40:11 +0200 (CEST) X-ME-UUID: 20050718154011336.520AD1C00043@mwinf1207.wanadoo.fr Message-ID: <008601c58bae$c576e140$322cf8c1@oemcomputer> From: "alphablock" To: "Alex Baretta" , "Ocaml" References: <9cc3782b05071411004b27b6a4@mail.gmail.com> <42DB6161.4030507@cs.utah.edu> <006801c58ba4$0b7bfe60$322cf8c1@oemcomputer> <42DBCA16.3000002@barettadeit.com> Subject: Re: [Caml-list] (Mostly) Functional Design? Date: Mon, 18 Jul 2005 17:38:38 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Miltered: at nez-perce with ID 42DBCD5D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42DBCD5C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 damien:01 baretta:01 ocaml:01 caml-list:01 damien:01 trivial:01 recursion:01 recursive:01 iterator:01 iterator:01 late-binding:01 recursive:01 multi-stage:01 parametrized:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: i love the internet and wise people giving me wise answers :) - damien ----- Original Message ----- From: "Alex Baretta" To: "alphablock" ; "Ocaml" Sent: Monday, July 18, 2005 5:26 PM Subject: Re: [Caml-list] (Mostly) Functional Design? > alphablock wrote: > > May be there are many less FP solutions than OOP solutions just because > > there are many less FP problems than OOP problems. > > > > Or may be i am plain naive, who knows... > > > > - damien > > I would not say so. It is just the problems tend to admit a fairly > simple--although generally not trivial solution. This does not justify a > large scale attempt to catalog all FP "design patterns" in a single > book. Let me try to list a few I can readily think of. > > * Indefinite recursion through tail call optimization > * Systematic elimination of explicit or implicit (recursive) cycles > whenever an iterator is available. If an iterator is not available for a > given data structure, it is often advisable to define one. > * Order preservation of sequential data structures such as lists through > the use of an even number of order reversing tail-recursive algorithms. > * Late-binding of recursive calls > * Multi-stage programming through partial evaluation > ... > > These ideas are more general coding strategies requiring a specific > design from the programmer, rather than parametrized design patterns > abstracting from the (absence of) cognitive abilities of the programmer. > > Alex > > > -- > ********************************************************************* > http://www.barettadeit.com/ > Baretta DE&IT > A division of Baretta SRL > > tel. +39 02 370 111 55 > fax. +39 02 370 111 54 > > Our technology: > > The Application System/Xcaml (AS/Xcaml) > > > The FreerP Project > > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >