hal9000 / hypermetrics.com writes:

> I do see that methods and attributes can be added and redefined
> at runtime in classes and objects. But understanding it and
> living it are perhaps different things.

To be honest with you, I only really started to understood it after I
wrote the chapter on classes for the book. It turns out the underlying
model is a lot simpler than you might suspect. There is really only
one mechanism (one and a half if you include module proxies).
Everything else comes about depending on the target of a message. It
is a truly elegant model.

> I have not given up on the idea of implementing a DBC module in
> Ruby. But every time I get into it, it makes my brain itch. I
> want to (have to!) make the conditions heritable, but I want to
> make it easy to use as well...

I think the inheritance part is fairly straightforward if you do method
rewriting. The problem comes with preserving old values. I haven't
worked out how to do that without a change to the interpreter.

Regards


Dave