Date: Fri, 10 May 1996 17:13:57 +0200
Message-Id: <9605101513.AA16888@crunch>
From: Thorsten Ohl <ohl@crunch.ikp.physik.th-darmstadt.de>
To: caml-list@pauillac.inria.fr
Subject: Re: Class variables in O'Caml??? + questions
In-Reply-To: <9605101257.AA06291@gr6.u-strasbg.fr>
<9605101257.AA06291@gr6.u-strasbg.fr>
>>>>> "Christian" == Christian Boos <boos@gr6.u-strasbg.fr> 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