From: Bob Hutchison Date: 2006-12-29T20:41:03+09:00 Subject: Re: Paper on strong Object Oriented Encapsulation (Was: some subject with needless insults) On 29-Dec-06, at 4:40 AM, Neil Wilson wrote: > In Eiffel, for example, there is no real way of hiding methods from > your descendants. Perfect example, you beat me to it :-) There is a book, "Object Oriented Software Construction, 2nd Edition" by Bertrand Meyer, that lays out in convincing detail, why hiding stuff from descendants is The Wrong Thing To Do. The whole book is a very convincing argument of how (class based) OO should be implemented, and at the very least, the issue that all OO programming languages must address. The closest thing to the language described in the book is Eiffel, but even that language isn't a complete implementation of what is described in the book. BTW, the argument starts on the first page of chapter two and ends about 800 pages later. There are no sound-bites -- Meyer is making a strong intellectual effort in this book and it takes some effort on the part of the reader to understand it. Not that it is hard to read, it isn't and it kind of plays out like a mystery book (the first chapter is a spoiler), but because a belief system is built up step by step. And, by the way, the book will help you to see other reasons why Ruby, Smalltalk, and lisp/CLOS are so clever -- these languages don't solve all of the issues Meyer believes are important or even crucial, but you can see that they address the issues by deliberately ignoring them :-) I have not read the article in question yet, but so far I have not seen an argument, other than by assertion or the still lamer "C++ does it and so it is right", that super classes should be protected from its subclasses. Wow. There it is... my annual rant, with two days to spare :-) I'll read the paper now. Cheers, Bob ---- Bob Hutchison -- blogs at Recursive Design Inc. -- Raconteur -- xampl for Ruby --