> How would you use static constructors/destructors? Perhaps we can show > you Ruby equivalents. > > -- > -- Jim Weirich Please consider the following (pseudo) C# example: public class AS400Server { static AS400 server; static AS400Server() { server = new AS400Connection("SERVERNAME"); } static ~AS400Server() // This is not real C# { server.disconnect(); } static int GetServer() { return server; } } I know this probably can be emulated using a singleton, I still believe having static destructors will be nice because: 1. I like the constructor/destructor symmetry in C++ 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 Thanks -- Posted via http://www.ruby-forum.com/.