From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 954BCBB81 for ; Fri, 17 Dec 2004 08:59:52 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iBH7xq3p012006 for ; Fri, 17 Dec 2004 08:59:52 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id IAA17408 for ; Fri, 17 Dec 2004 08:59:51 +0100 (MET) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBH7xn1M009637 for ; Fri, 17 Dec 2004 08:59:50 +0100 Received: from [192.168.1.200] (ppp196-155.lns1.syd2.internode.on.net [203.122.196.155]) by smtp1.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id iBH7xcRF034427; Fri, 17 Dec 2004 18:29:38 +1030 (CST) Subject: Re: [Caml-list] Dummy polymorphic constructors From: skaller Reply-To: skaller@users.sourceforge.net To: John Prevost Cc: Alex Baretta , Ocaml In-Reply-To: References: <41C1E091.1040508@barettadeit.com> Content-Type: text/plain Message-Id: <1103270377.15260.27.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 17 Dec 2004 18:59:37 +1100 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 41C291F8.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41C291F5.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 constructors:01 sourceforge:01 prevost:01 wrote:01 baretta:01 wrote:01 ocaml:01 variants:01 glebe:01 061:98 polymorphic:01 polymorphic:01 abstract:01 nsw:01 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: On Fri, 2004-12-17 at 09:38, John Prevost wrote: > On Thu, 16 Dec 2004 20:22:57 +0100, Alex Baretta wrote: > > Currently ocaml does not support empty polymorphic variant sum types. > > Say, I cannot write the following. > > > > type empty = [ ] > I'm somewhat confused as to why this is different from simply > declaring a new opaque type: > > type empty > > Since there is no way to construct a value of the type, nor any way to > deconstruct such a value, how is it different? Polymorphic variants are extensible and algebraic .. an abstract type is neither. -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net