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 RAA15348; Tue, 2 Sep 2003 17:12:14 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA02528 for ; Tue, 2 Sep 2003 17:12:13 +0200 (MET DST) Received: from ep09.kernel.pl (ep09.kernel.pl [212.87.11.162]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h82FCBf21723 for ; Tue, 2 Sep 2003 17:12:12 +0200 (MET DST) Received: (qmail 30317 invoked by uid 566); 2 Sep 2003 15:12:04 -0000 Date: Tue, 2 Sep 2003 17:11:45 +0200 From: Michal Moskal To: Richard Jones Cc: caml-list@inria.fr Subject: Re: [Caml-list] Alternate constructors for a class Message-ID: <20030902151145.GA4055@roke.freak> Mail-Followup-To: Richard Jones , caml-list@inria.fr References: <20030902134537.GA7309@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030902134537.GA7309@redhat.com> User-Agent: Mutt/1.4.1i X-PGP-Fingerprint: CF89 1B14 11BE 1CC9 2CA3 7497 5E32 69B4 BC71 B4C2 X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; michal:01 moskal:01 malekith:01 pld-linux:01 caml-list:01 michal:01 moskal:01 malekith:01 kernel:01 sep:01 constructors:01 constructors:01 objects:02 gcs:03 wrote:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, Sep 02, 2003 at 02:45:37PM +0100, Richard Jones wrote: > Is there an easy way to provide two different constructors for a > class? Export function for constructing objects of this class. You can also only export class type, not the class itself, to allow object construction only through this function. Of course there can be any number of this kind of constructor-functions. -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : When in doubt, use brute force. -- Ken Thompson : {E-,w}-- {b++,e}>+++ h ------------------- 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