From: "ara.t.howard" Date: 2009-10-13T13:45:31+09:00 Subject: Re: Class Level inheritable attributes - are we there yet? On Mon, Oct 12, 2009 at 17:48, David A. Black wrote: > that does not imply that these should be > typed out by hand anew every time they're going to be used. ?? the OP simply asked why a useful idiom wasn't supported in core, which includes it's libraries. he very clearly asked for "the best solution in use." the subsequent posts responded as to why we shouldn't change the language, which was never suggested, and a critique of the of the example code, which was never asked for. the implication was quite clear: that there isn't a best practice and that solution should be typed out by hand since "you can make what are essentially language-level-like constructs from a few lines of code in Ruby" this really isn't true in this case and it is precisely at the center of the OP's dilemma: how to best approach having inheritable class state without writing subtle and error prone code. unless a concrete answer regarding which libraries to use or a tested, proven, and complete implementation is given i think the the OP isn't being given a fair answer to a fair question which was not: 'what do people think about this', but was instead: 'how, exactly, should i do this and follow best practices.' honestly, if you read the thread start to finish, i do not think the OP's question was given due consideration and i also think his intent was co-opted into a request for a language change. i'm simply requesting that the group focus on a good, concrete, solution for a hard problem instead of simply telling people that the issue is so easy that it's not even worth solving. i'd love to see some thinking about the various attempts at a complete solution. the OP has already noted that the most common are flawed for even moderately complex use cases, maybe the collective can narrow in on, and even improve upon, the better ones. i've personally spent a week or two trying to solve this problem in the general case and have found it profoundly slippery to get right. i've already posted my attempt at a minimal but complete solution (fattr) but would love to hear some legitimate and thoughtful analysis of other approaches. if a particular solution could gain some momentum as being best practice it would a big help for the next generation of ruby programmers - so much so that an RCR, or whatever they are called these days, might really be in order. regards. -- -a -- be kind whenever possible... it is always possible - h.h. the 14th dalai lama