[jboss-dev] Abstract classes?

Jason T. Greene jason.greene at redhat.com
Wed Jun 3 09:33:48 EDT 2009


Jason T. Greene wrote:
> Adrian Brock wrote:
>> On Tue, 2009-05-26 at 17:26 +0200, Ales Justin wrote:
>>> I don't think they were ever truly abstract.
>>>
>>> It just indicates that they are there as a default impl,
>>> which you can easily override if in need of something more.
>>>
>>> I agree with you that it's probably not the best name choice,
>>> it could be Base or really Default,
>>> but I think you should ping Adrian to explain you the real motivation 
>>> behind the name.
>>
>> "Abstract" has nothing to do with the "abstract" keyword in java.
>>
>> Except that the semantic is similar.
>> i,e. The classes are not usable by themselves, they usually need to be
>> extended or are at least designed to be mainly extended if you don't
>> want "noop" behaviour.
> 
> Then there should be no reason to instantiate it.
> 
>> The rest of the argument is just "humpty dumpty".
>>
>> <quote>When I use a word it means exactly what I say it means;
>> no more, no less.</quote>
> 
> The humpty dumpty argument is very weak. Following this argument, I 
> could call every class StringXXX, since the code making up the class 
> itself is a String. This, however, does not make it a good name. Names 
> are completely meaningless if they do not convey a meaning to someone 
> besides the author. That is unless you intend on being the only person 
> to use it.
> 

BTW for the record, I think seeing instances of AbstractXXX floating 
around in AS is actually pretty awesome ;)

It's definitely a minor issue. I just don't want us defending every API 
design with self-serving bias.

-- 
Jason T. Greene
JBoss, a division of Red Hat



More information about the jboss-development mailing list