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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 61978BC69 for ; Mon, 20 Aug 2007 08:54:56 +0200 (CEST) Received: from ipmail01.adl2.internode.on.net (ipmail01.adl2.internode.on.net [203.16.214.140]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l7K6sqU7004391 for ; Mon, 20 Aug 2007 08:54:55 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAALLWyEZ5LGJp/2dsb2JhbAAM X-IronPort-AV: E=Sophos;i="4.19,283,1183300200"; d="scan'208";a="175959158" Received: from ppp121-44-98-105.lns10.syd6.internode.on.net (HELO [192.168.1.201]) ([121.44.98.105]) by ipmail01.adl2.internode.on.net with ESMTP; 20 Aug 2007 16:24:24 +0930 Subject: Re: [Caml-list] If OCaml were a car From: skaller To: Jon Harrop Cc: caml-list@yquem.inria.fr In-Reply-To: <200708200437.59877.jon@ffconsultancy.com> References: <56864F61-40F3-4F03-9823-6D510AD5320B@epfl.ch> <1187559941.6987.40.camel@rosella.wigram> <200708200437.59877.jon@ffconsultancy.com> Content-Type: text/plain Date: Mon, 20 Aug 2007 16:54:22 +1000 Message-Id: <1187592862.6295.60.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 46C93ABD.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 0100,:01 ocaml:01 tweaking:01 syntax:01 parallelism:01 sourceforge:01 wrote:01 caml-list:01 functions:01 functions:01 argument:02 argument:02 unit:03 unit:03 On Mon, 2007-08-20 at 04:37 +0100, Jon Harrop wrote: > Why should the return value (of unit) not be used as the argument to an > application? Because functions returning unit are always executed for side-effects since unit conveys no information, so allowing a procedure to be used as an argument means the order of side effects depends on implementation dependent argument evaluation ordering, that is, it is indeterminate. In Felix banning side-effects from functions allows optimisations Ocaml will have a much harder time applying, since Felix bans side-effects from functions, and the type system helps by requiring procedures to return the vacuous type void. [But this still doesn't give referential transparency ;] > > print$ "Hello" + " World"; > You might prefer the F# operators |>, << and >>. I might. But I'll use what Inria provides. > I'd much rather > see effort go into an IDE rather than tweaking the syntax and breaking > backward compatibility. I'd never use the IDE.. so I'd rather the effort be going into (a) the type system, parallelism, etc -- which it is! (b) libraries -- which it isn't ;( -- John Skaller Felix, successor to C++: http://felix.sf.net