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=1.2 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id B8DF6BC69 for ; Wed, 1 Aug 2007 18:23:47 +0200 (CEST) Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.176]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l71GNlLi005596 for ; Wed, 1 Aug 2007 18:23:47 +0200 Received: by ik-out-1112.google.com with SMTP id c21so76687ika for ; Wed, 01 Aug 2007 09:23:46 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bP76h+52wa1vbwv4zHqcw9baVV8nj2jM/g7ptb8VP3k+oPuFPYlx4ElXjvTml78aKTrVh30FLQpZxoT8bBUYgY0ohwJLx4utWHSokD/hmA/nEjJ6AAe49ZwQX0IPIASgG3bsGf/noFYl6BjnQ8ChRScmk4d+8Ie6nu4R0NZPjZw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=RcYrApY/4IanzSfLqU13BiY8/Bv9vuQOM8mjji7/+5l4i96OqC1tZmDR/Jtw/W5cnh7HmAP0m2hzBEOkkaynWLnLY+vwOkzTTRQzK5NIT8mYqSbfvl25kqPtHRFtZsaFndtID8VM1DJT0PFDBHI+A7lV2BrZYO9LfKDfFTITMhA= Received: by 10.142.231.7 with SMTP id d7mr40632wfh.1185985421093; Wed, 01 Aug 2007 09:23:41 -0700 (PDT) Received: by 10.142.255.12 with HTTP; Wed, 1 Aug 2007 09:23:40 -0700 (PDT) Message-ID: Date: Wed, 1 Aug 2007 12:23:40 -0400 From: "Markus Mottl" To: Tom Subject: Re: [Caml-list] Re: Void type? Cc: "Brian Hurt" , caml-list@yquem.inria.fr In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200707291216.34682.jon@ffconsultancy.com> <46AC7BB8.8050609@gmail.com> <20070729124340.GA18564@furbychan.cocan.org> <46AC8EEF.1040102@gmail.com> <20070729170216.GA8137@furbychan.cocan.org> <46ACF35F.5070102@lix.polytechnique.fr> <1185770437.11618.29.camel@rosella.wigram> X-j-chkmail-Score: MSGID : 46B0B393.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 46B0B393.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; markus:01 mottl:01 markus:01 mottl:01 struct:01 ocaml:01 wrote:01 abstract:01 typing:01 typing:01 exception:01 caml-list:01 unsafe:01 essentially:02 match:02 On 8/1/07, Tom wrote: > I am still not convinced about the usability of the void type... Why simply > not declare type b as abstract? > > module Myreq = struct > type a = whatever > type b > end > > Essentially, it means the same, just less typing. Less typing in the type definition, but more typing handling a function or match branch that makes use of a value of type b. You'd either have to raise an exception there, or do something unsafe. The "void"-solution is much cleaner. Regards, Markus -- Markus Mottl http://www.ocaml.info markus.mottl@gmail.com