[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspectj-users] Capturing extending classes in compile time?
- From: Dean Wampler <dean@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 11 Jan 2006 23:14:13 -0600
- Delivered-to: email@example.com
- Organization: Aspect Research Associates
- User-agent: Thunderbird 1.5 (Windows/20051201)
They actually make some sense if you've read "Effective Java". There are
issues with subclassing concrete classes and the behavior of some
special methods like "clone". Personally, I wouldn't make these ideas a
hard requirement, but I generally find them good rules of thumb, in part
because they reduce the temptation to build deep hierarchies, which tend
to be somewhat inflexible. Composition with relatively flat class
hierarchies is generally preferable for organizing "variations".
Mark Thomas wrote:
Paulo Alexandre Corigo Zenida wrote:
- Classes that don't have subclasses should be declared as final
- Classes that have subclasses should be declared as
abstract, and therefore, not able to be instantiated (this way, only
the derived classes can be instantiated. The example this person
invoked was the Human Being to be abstract and the subclasses Man and
Woman being the derived ones).
In passing, these seem like really bad ideas. Or are they just examples?
aspectj-users mailing list
Dean Wampler, Ph.D.
dean at aspectprogramming.com
I want my tombstone to say:
Unknown Application Error in Dean Wampler.exe.