ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Duncan Davidson <>
Subject Re: Additions changes to the taskdefs.
Date Fri, 05 Jan 2001 20:07:05 GMT
On 1/4/01 2:58 AM, "Peter Donald" <> wrote:

> Actually usually it is immutables that have the UPPER_CASE notation of
> which static final primitive types are a subset.

So, should I mark my Strings with UPPCASE notation since, they are
technically immutable (even if I can move the reference)? :) (just to be
clear, that was a joke).

> Most theory is based around what I call cognitive programming. Your eyes
> should  never travel more than 2 lines above current line and 3 lines below
> and you should never have to stop typing. All variables should be full
> names or "well known shortcuts" which means none of those miss the vowels
> or shortening of names ;)

Names should be explanatory, yes.

>> potentially accessed from anywhere in your system as is possible when using
>> oo languages with less enforcement of encapsulation where you can cheat and
>> call things that should be private just because you can.
> nope - most OO theory saids objects should never expose member attributes
> so that is irrelevent.

I'm not talking about OO theory. I'm talking about OO implementations
(especially ones with direct pointers) where you can call methods that are
supposed to be private without having the compiler or linker complain.

>> And for those of you worried about the performance drag of method calls,
>> Hotspot optimizes most bean methods out to simple variable accesses at
>> run-time when possible -- so avoids any performance penalty.
> And even on non-hotspot machines marking the accessor methods as final will
> achieve the same for older VMs (I think 1.7+ ???).

Marking the accessor as final will have a performance improvement on almost
any VM (by some degree). However, it's still a method call. The time savings
is taken by not having to check in any other place to see if the method is

However, marking methods final for performance reasons is silly in this day
and age. :)

James Duncan Davidson                              
                                                                  !try; do()

View raw message