Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Capturing extending classes in compile time?

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".

My $0.02,
Dean

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?

Mark
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


--
Dean Wampler, Ph.D.
dean at aspectprogramming.com http://www.aspectprogramming.com http://www.contract4j.org I want my tombstone to say: Unknown Application Error in Dean Wampler.exe. Application Terminated.
  [Okay]    [Cancel]



Back to the top