From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 A09DABB9C for ; Fri, 9 Dec 2005 13:21:56 +0100 (CET) Received: from triton.rz.uni-saarland.de (triton.rz.uni-saarland.de [134.96.7.25]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jB9CLuFr029808 for ; Fri, 9 Dec 2005 13:21:56 +0100 Received: from mail.cs.uni-sb.de (mail.cs.uni-sb.de [134.96.254.200]) by triton.rz.uni-saarland.de (8.12.10/8.12.10) with ESMTP id jB9CLsxh7091600 for ; Fri, 9 Dec 2005 13:21:54 +0100 (CET) Received: from mail.ps.uni-sb.de (james.ps.uni-sb.de [134.96.186.68]) by mail.cs.uni-sb.de (8.13.5/2005101700) with ESMTP id jB9CLsTi005206 for ; Fri, 9 Dec 2005 13:21:54 +0100 (CET) Received: from groove.ps.uni-sb.de ([134.96.186.112]) by mail.ps.uni-sb.de with esmtp (Exim 4.50) id 1EkhG5-00038x-7s for caml-list@yquem.inria.fr; Fri, 09 Dec 2005 13:21:53 +0100 Message-ID: <439976E0.305@ps.uni-sb.de> Date: Fri, 09 Dec 2005 13:21:52 +0100 From: Andreas Rossberg User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: caml-list@yquem.inria.fr References: <1134009551.10435.24.camel@rosella> <20051208.121012.49167263.garrigue@math.nagoya-u.ac.jp> <1134092611.8940.57.camel@rosella> In-Reply-To: <1134092611.8940.57.camel@rosella> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 134.96.186.112 X-SA-Exim-Mail-From: rossberg@ps.uni-sb.de Subject: Re: [Caml-list] partial application warning unreliable? X-SA-Exim-Version: 4.2 (built Thu, 03 Mar 2005 10:44:12 +0100) X-SA-Exim-Scanned: Yes (on mail.ps.uni-sb.de) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.1 (triton.rz.uni-saarland.de [134.96.7.25]); Fri, 09 Dec 2005 13:21:55 +0100 (CET) X-AntiVirus: checked by AntiVir Milter (version: 1.1.1-9; AVE: 6.33.0.15; VDF: 6.33.0.16; host: AntiVir2) X-Miltered: at concorde with ID 439976E4.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; rossberg:01 rossberg:01 caml-list:01 iirc:01 trivial:01 wrote:01 uni-sb:01 uni-sb:01 partial:01 functions:01 functions:01 andreas:01 andreas:01 expression:01 argument:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 skaller wrote: > > The correct type is void, however unit > will catch more errors than 'a. IIRC, this has been discussed in the past, but since you iterate this statement repeatedly, let me reinforce that it is incorrect. Void is the empty type. No value of this type can be constructed. Since in ML, everything is an expression, and every "procedure" a function, they all have to evaluate to something. Hence, the only possible functions with result type void are those that do not return. The only possible functions with argument type void are those that can never be called. The type unit on the other hand, is the trivial type. It carries just one value, and hence no information. Consequently, it is the canonical type to use for functions that do not require or do not return any information. Type theory wasn't well developed in the 60s, when Algol 68 (I think) introduced its notion of void type that was later inherited, in even more abusive ways, by C and friends. The name is just historical accident, it really ought to be unit. - Andreas -- Andreas Rossberg, rossberg@ps.uni-sb.de Let's get rid of those possible thingies! -- TB