I need your opinion...
develop4lasu at gmail.com
Sun Mar 22 03:48:35 PDT 2009
2009/3/22 Joseph D. Darcy <Joe.Darcy at sun.com>:
> I find none of these compelling for Project Coin.
Could you tell what 'compelling' mean for you?
W dniu 22 marca 2009 08:02 użytkownik Joshua Bloch <jjb at google.com> napisał:
> I have to disagree with my esteemed colleague John on this one. I believe
> that every language has certain characteristics that make it what it is, and
> that these things simply shouldn't be changed. I believe that one such
> attribute of Java is that all declared entities have an explicit declared
> type. I believe it would do great harm to the language to change this.
I agree with you, but in my opinion Java is not on last step of it's
evolution. At simple code language gain powder to focus on logic, but
while I started to use generics or multi-thread applications my focus
moved to much to types.
when you see code:
You can count that there are 4 valuse without explicit types:
return arraylist.(Container<PersonLocalizator> get( (int
arraylist.size()) -1)) .(Identificator<PersonLocalizator>
getIdentificator())).( String getName());
As you see i added explicid types but it decreased redability of
code, same thing programers need to deal with every day.
Now second example:
a) Standard code (+/-):
String name =
Data<PersonLocalizator> data = arraylist.get(arraylist.size()-1).Data();
b) Proper code:
final Container<PersonLocalizator> lastPerson =
name = lastPerson.getIdentificator().getName();
data = lastPerson.Data();
} // lastPerson == you shouldn't use it
c) with final (& forget):
final lastPerson = arraylist.get(arraylist.size()-1);
String name = lastPerson.getIdentificator().getName();
Data<PersonLocalizator> data = lastPerson.Data();
// forget lastPerson; // if you shouldn't use it any more
Most peoples will not explicit declare lastPerson and write code in
(a) form ( more compact code, do not have to deal with new variable on
all method) , while in (b) case final and block is almost always
overlooked, (c) force people to use proper style because if they will
use final they will know that 'it is what it is' and, will think twice
before make it value.
Pozdrowionka. / Regards.
Lasu aka Marek Kozieł
More information about the coin-dev