directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@apache.org>
Subject Re: Dn, RDn, Ava : Final classes ?
Date Tue, 22 Mar 2011 12:26:49 GMT
I reverted the change made on those classes a while back (they where all 
final) We can make them final if needed later, but I don't think it was 
a good idea to have made them final at first (most certainly my fault).

We can continue the discussion further.

On 3/22/11 12:31 PM, Alex Karasulu wrote:
> On Mon, Mar 21, 2011 at 7:21 PM, Emmanuel Lécharny<elecharny@apache.org>wrote:
>
>> On 3/21/11 5:43 PM, Alex Karasulu wrote:
>>
>>> On Mon, Mar 21, 2011 at 6:39 PM, Emmanuel Lecharny<elecharny@gmail.com
>>>> wrote:
>>>   Hi guys,
>>>> do you think it's a good idea to make the Dn, Rdn and Ava classes final ?
>>>>
>>>>
>>>>   I'd avoid this because it would limit extension. Are we gaining a lot by
>>> making them final?
>>>
>> Not that much, but as the classes are immutable, I was thinking that it's
>> not really necessary to have them not final.
>
> Immutability and extension are orthogonal concerns. You can still have
> immutability in the base class, extend the class and add more fields that
> are needed for some aspect of handling like we did for example with these
> decorators in the codec for the req/resp classes.
>
> Hence for the sake of the core properties they're still immutable but
> extension may be an option left for users allowing the use of the class in
> various scenarios we cannot think of in advance.
>
> Also it might be faster (inline methods, etc)
>>
> Property accessor/mutators can be declared final but optimizations should
> occur anyway, of course this is JVM dependent but I'd pass on small
> optimization gains for now.
>
>
>> Just wanted to hear other's opinion here.
>>
>>
> I appreciate that.
>
> Regards,
> Alex
>


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Mime
View raw message