From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id SAA25684 for caml-redistribution; Fri, 10 May 1996 18:10:13 +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 RAA22201 for ; Fri, 10 May 1996 17:14:07 +0200 Received: from rs1.hrz.th-darmstadt.de (rs1.hrz.th-darmstadt.de [130.83.22.60]) by concorde.inria.fr (8.7.1/8.7.1) with SMTP id RAA02109 for ; Fri, 10 May 1996 17:14:01 +0200 (MET DST) Received: from crunch (crunch.ikp.physik.th-darmstadt.de [130.83.24.4]) by rs1.hrz.th-darmstadt.de (8.6.12/8.6.12.0ms) with SMTP id RAA17653 for ; Fri, 10 May 1996 17:13:58 +0200 Received: by crunch (AIX 3.2/UCB 5.64/Client-1.5/HRZ-THD) id AA16888; Fri, 10 May 1996 17:13:57 +0200 Date: Fri, 10 May 1996 17:13:57 +0200 Message-Id: <9605101513.AA16888@crunch> From: Thorsten Ohl To: caml-list@pauillac.inria.fr Subject: Re: Class variables in O'Caml??? + questions In-Reply-To: <9605101257.AA06291@gr6.u-strasbg.fr> References: <9605101046.AA12307@crunch> <9605101257.AA06291@gr6.u-strasbg.fr> Sender: weis >>>>> "Christian" == Christian Boos writes: Christian> IMO, the use of references is not so unnatural. Together Christian> with structs, it provides a clean way to encapsulate global Christian> state and actions for classes. Sure, it us possible to do it. But, IMHO, class variables should be declared in the class and be opaque. If you put several classes in a module, the use of module wide references makes much less sense. Another hack is to define a sub-module for each class, but that's not nice either ... I'm just curious if (and why) this syntactic sugar has been left out intentionally. -- Thorsten Ohl, Physics Department, TH Darmstadt --- PGP: AF 38 FF CE 03 8A 2E A7 http://crunch.ikp.physik.th-darmstadt.de/~ohl/ -------- 8F 2A C1 86 8C 06 32 6B