From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA22822; Tue, 1 Jul 2003 19:20:44 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 TAA22817 for ; Tue, 1 Jul 2003 19:20:43 +0200 (MET DST) Received: from mail.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h61HKff10181 for ; Tue, 1 Jul 2003 19:20:41 +0200 (MET DST) Received: (qmail 9226 invoked from network); 1 Jul 2003 17:20:40 -0000 Received: from unknown (HELO grace.speakeasy.org) ([216.254.0.2]) (envelope-sender ) by mail11.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 1 Jul 2003 17:20:40 -0000 Date: Tue, 1 Jul 2003 10:20:40 -0700 (PDT) From: brogoff@speakeasy.net To: Pierre Weis cc: "Yaron M. Minsky" , "caml-list@inria.fr" Subject: Re: [Caml-list] syntax of private constructors in CVS version In-Reply-To: <200307011705.TAA21900@pauillac.inria.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam: no; 0.00; brogoff:01 caml-list:01 pierre:01 weis:01 yaron:01 minsky:01 cornell:01 yminsky:01 structs:01 immutable:01 mutable:01 speakeasy:01 constructors:01 syntax:02 signatures:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, 1 Jul 2003, Pierre Weis wrote: > > Would it be fair to say that the main distinction between private types > > and abstract types is that with private types, constructors are only > > invocable from inside the module, but destructors (e.g., pattern > > matching) are available both inside and outside of the module? > > > > y > > -- > > |--------/ Yaron M. Minsky \--------| > > |--------\ http://www.cs.cornell.edu/home/yminsky/ /--------| > > You are right: that's yet another way to say it :) To make this a bit more consistent, wouldn't it be better to restrict the occurrence of private to signatures? It is currently allowed in structs too. Is there a case where it is useful outside of a signature? There was a similar idea that was proposed a while ago about providing an immutable view of mutable objects, which is also appealing. Any progress with that one? -- Brian ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners