On Thu, Oct 15, 2009 at 01:18, Robert Klemme <shortcutter / googlemail.com> wrote: > Thanks for the pointers! Now that looks quite specific. It seems > fattr is a superset of the koan list, correct? > it is. of course evolved. main evolutions involve . no namespace pollution (closures for state) . inheritance > I noticed a few things about your koans (a quite nice way to formulate > the spec btw.): in koan 8 and 9 you have two default values. It might > be easier for readers and technical validation if there would be two > different values; then there cannot be any confusion which value is > inherited where. Also, I believe tests like "assert{ (o.a = nil) == > nil }" should better be rewritten as > > o.a = nil > assert{ o.a == nil } > > Because Ruby guarantees that the assignment will always return the > rvalue which makes the original assert infallible. well, i'm dumb like that ;-) of course you are right. >> needs to do something sane. > > Sane is good, but where does insanity start? :-) > cd ~ahoward ;-) >> i also feel that any copying from the >> parent (aka inheriting state) should be deferred untill the value is >> actually referenced, otherwise very surprising things happen. > > On first inspection I think I like the koans better than fattr which > seems like the swiss army knife of attribute definition because fattr > provides rich functionality. While this is generally a good thing, > the difference in complexity to the attr_* family of methods is > significant. If time permits I will play a bit with this to get a > better feeling. Thanks again check out the project on github: http://github.com/ahoward/fattr -- -a -- be kind whenever possible... it is always possible - h.h. the 14th dalai lama