From: "trans. (T. Onoma)" Date: 2004-11-25T16:06:39+09:00 Subject: Re: Generalizing and Organizing Code On Tuesday 23 November 2004 10:19 am, David A. Black wrote: | I don't think I'd characterize module-wise organization as a name | trick of the same kind as hanging things off a method name. Also, | don't be squeamish about class << self -- the "<< obj" notation is | really just an alternative to the "SomeConstant" notation, designed to | work with anonymous classes. Unfortunately it has a reputation as | tricky or 3vi1 or whatever, but it really isn't :-) Fair enough. I think it gets the reputation b/c of how it looks --it looks "tricky" and is not readily intuitive. | > What is the proper way to handle this in a class-based OOPL? | | I can't claim definitiveness by any means, but here's a mock-up of one | possibility (untested): | | [snip excleent exmaple] I very much like your example. Nice and clean. Easy to follow. And I've used a part of it: the state is the object. That part's especially nice. Unfortunately the document stack being a class instance var worries me as I do not think it thread safe. But that's okay, I also used a part of Robert's example to remedy that. Thanks and Happy Thanksgiving, David. T.