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 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 7D0B8BC6C for ; Tue, 29 Jan 2008 00:16:30 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAIfwnUfUnw6Flmdsb2JhbACCNo1nAQEBAQcEBgcKEQebSw X-IronPort-AV: E=Sophos;i="4.25,263,1199660400"; d="scan'208";a="8469364" Received: from pih-relay06.plus.net ([212.159.14.133]) by mail3-smtp-sop.national.inria.fr with ESMTP; 29 Jan 2008 00:16:30 +0100 Received: from [80.229.56.224] (helo=beast.local) by pih-relay06.plus.net with esmtp (Exim) id 1JJdDI-0008Va-W9; Mon, 28 Jan 2008 23:16:29 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: "Till Varoquaux" Subject: Re: [Caml-list] [OSR] OCaml Standard Recommandation Process Date: Mon, 28 Jan 2008 23:10:54 +0000 User-Agent: KMail/1.9.7 Cc: caml-list@yquem.inria.fr References: <200801281204.00689.jon@ffconsultancy.com> <200801282049.08477.jon@ffconsultancy.com> <9d3ec8300801281405y5fc18db5sce85639dfc3dee22@mail.gmail.com> In-Reply-To: <9d3ec8300801281405y5fc18db5sce85639dfc3dee22@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801282310.54770.jon@ffconsultancy.com> X-Plusnet-Relay: 41487d1a00e1053e53dea3eb471bf466 X-Spam: no; 0.00; ocaml:01 ocaml:01 runtime:01 variants:01 recursive:01 combinators:01 trivial:01 elegantly:01 syntax:01 afresh:98 advancements:98 frog:98 polymorphic:01 wrote:01 caml-list:01 On Monday 28 January 2008 22:05:30 Till Varoquaux wrote: > It is worth noting that OCaml is not F#. Objects in OCaml, unlike in > F#, are an advance feature, many users find them hard to grasp and > work with. They also come with a rather high runtime cost. Unless we > have a good reason to do so, I think we should avoid bolstering them > at the very core of the standard library. In this case, the user doesn't see anything at all of the objects. > Don't get me wrong, I think objects have a purpose; and so have > polymorphic variants and recursive modules but great care should be > taken before axing the core library around them. Absolutely. I couldn't agree more. I would say exactly the same of working around the absence of a "try..finally" construct using combinators. The problem is that trivial tasks like reading lines from a file are made much more difficult for newbies because OCaml pulls in so many complicated concepts but this complexity is completely incidental, completely man-made. OCaml is better in the long-run, of course, but many languages solve these common problems much more elegantly than OCaml. > We should keep complicated solutions for complicated problems. Exactly but OCaml is moving in the opposite direction because it is a research project: it is getting more complicated. The community would benefit enormously from lots of simple things like String.fold_right and a "try..finally" construct (I've no preference for those two, I'm just picking them out of hundreds of common ideas) but INRIA cannot afford to do such things themselves and are instead focussing on advanced research concepts like integrating generalized algebraic data types instead. That is great research, but it does not help people to use OCaml as a tool. Hence if the community wants this improved then they must improve it themselves. That means either forking OCaml or starting afresh. > Although is is tempting to propose a solution for IO using phantom > types, objects or whatnot, I still think the Common Lisp approach > (using unwind_protect) is an elaborate enough one to avoid most > problems whilst remaining simple enough to be viable. Yes. The only difference is syntax and I think that is an important difference. > A great solution in F# might not translate as well in OCaml, or it > might not translate at all. I was proposing that we learn from the advancements made in other languages rather than referring to porting F# code to OCaml code. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e