From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id VAA16118 for caml-redistribution; Tue, 23 Jul 1996 21:17:49 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.6.10/8.6.6) with ESMTP id RAA09949 for ; Tue, 23 Jul 1996 17:16:42 +0200 Received: from margaux.inria.fr (margaux.inria.fr [128.93.8.2]) by concorde.inria.fr (8.7.1/8.7.1) with ESMTP id RAA28906 for ; Tue, 23 Jul 1996 17:16:42 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by margaux.inria.fr (8.6.10/8.6.6) with ESMTP id RAA12668 for ; Tue, 23 Jul 1996 17:16:29 +0200 Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by concorde.inria.fr (8.7.1/8.7.1) with SMTP id RAA28564 for ; Tue, 23 Jul 1996 17:14:12 +0200 (MET DST) Received: from tcs.inf.tu-dresden.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with SMTP id RAA21937 for ; Tue, 23 Jul 1996 17:13:14 +0200 Received: from ithif02.ithi by tcs.inf.tu-dresden.de (4.1/SMI-4.1) id AA03391; Tue, 23 Jul 96 17:12:41 +0200 Received: by ithif02.ithi (5.x/SMI-SVR4) id AA02896; Tue, 23 Jul 1996 17:12:40 +0200 Date: Tue, 23 Jul 1996 17:12:40 +0200 Message-Id: <9607231512.AA02896@ithif02.ithi> From: Hendrik Tews To: caml-list@margaux.inria.fr Subject: constructors for objects in ocaml Sender: weis Hi everybody, it is possible to define something like a constructor in ocaml, ie to add an expression to a class which is evaluated every time an object is created? I tried something like class top arg as self = method create x = let _ = print_x in x val x = self#create arg end;; but got an error saying, that self is unbound. Bye, Hendrik Tews