From: Jim Weirich Date: 2006-04-02T12:30:01+09:00 Subject: Re: (Static) Constructors/Destructors in Ruby Primary Key wrote: > Jim Weirich wrote: > >>> 2. It can be helpful for meta-programming purposes. My impression is >>> most languages try to implement the traditional OO tools on class >>> (static) level >> >> I'm not getting statement #2 above. > > Please consider the evolution of the class-level language features: > > 1. C++ - static member variables > 2. Java - static members and static initialization blocks > 3. C# - static members and static constructors > > I think there is a clear pattern of implementing more and more of the > object-level OO features on class (static) level. Ok, at least for C-style languages I won't argue the point (although I'm not entirely clear what a static constructor is ... other than a factory function). > [...] As far > as meta-progamming is concerned the static features will beef up the > class level in the object-class-metaclass triad. I'm still unclear on how static methods do anything to support meta-progarmming. Perhaps an example might prove illuminating. -- -- Jim Weirich -- Posted via http://www.ruby-forum.com/.