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 KAA27052 for caml-redistribution; Tue, 14 May 1996 10:06:22 +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 VAA19431 for ; Mon, 13 May 1996 21:07:04 +0200 Received: from gemsgw.med.ge.com (gemsgw.med.ge.com [192.88.230.10]) by concorde.inria.fr (8.7.1/8.7.1) with SMTP id VAA25217 for ; Mon, 13 May 1996 21:07:02 +0200 (MET DST) Received: from gemed.med.ge.com (gemed.med.ge.com [3.7.12.4]) by gemsgw.med.ge.com (8.6.12/8.6.12) with ESMTP id OAA24479 for ; Mon, 13 May 1996 14:05:17 -0500 Received: from nmri.med.ge.com (snap.med.ge.com [3.57.196.10]) by gemed.med.ge.com (8.6.12/8.6.12) with SMTP id OAA20828; Mon, 13 May 1996 14:07:50 -0500 Received: from swag.med.ge.com by nmri.med.ge.com (4.1/SMI-4.1) id AA05531; Mon, 13 May 96 12:08:55 PDT Received: by swag.med.ge.com (5.x/SMI-SVR4) id AA12355; Mon, 13 May 1996 12:04:20 -0700 Date: Mon, 13 May 1996 12:04:20 -0700 From: gurr@snap.med.ge.com (David Gurr) Message-Id: <9605131904.AA12355@swag.med.ge.com> To: caml-list@pauillac.inria.fr Subject: Re: Class variables in O'Caml??? + questions X-Sun-Charset: US-ASCII Sender: weis Jerome Vouillon : > On Fri, 10 May 1996, Thorsten Ohl wrote: > > Sure, it us possible to do it. But, IMHO, class variables should be > > declared in the class and be opaque. > > ... > > I'm just curious if (and why) this syntactic sugar has been left out > > intentionally. > > It has not been left out intentionally. Many object-oriented languages > (C++, Objective C and Modula 3, for instance) do not have class variables, C++ does have class variables but since everything is renamed in C++ they are called static member variables or static data members or ... . > ... they can be easily simulated using references as you noticed. Why not make class variables exactly that, slots of the class object? -D