Browse thread
Re: Class variables in O'Caml??? + questions
- gurr@s...
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | gurr@s... |
| Subject: | Re: Class variables in O'Caml??? + questions |
Jerome Vouillon <vouillon@clipper.ens.fr>: > 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