The language talks at JavaOne had a good attendance. At first you may feel "geez, how about getting real security in EJBs ... that is more important than a damn for shortcut". But these things do matter.
I have been involved in many communities, and maybe none like the Perl community. Since they are lead by a linguist (Larry Wall), the language is very different. You may say that it is too complicated, too easy to make it look like line-noise, etc.... but has two characteristics:
Fun: You can do things how you want, and have fun trying to do weird things [yes, this may not lead to the best code . ]
Restricted: You do not feel at all restricted with this language. You can do things however YOU want [again, maybe not the best idea for the masses
For me, items like a simple foreach construct help a lot. Now code like Cedric's and Cameron's go from:
public boolean containsAll(Collection c) {
for(Iterator iter = c.iterator(); iter.hasNext() ; ) {
if (!contains(iter.next()) {
return false;
}
}
return true;
}
to:
public boolean containsAll(Collection c) {
for (Object o : c) {
if (!contains(o)) return false;
}
return true;
}
Not a BIG deal sure, but a bit cleaner none the less. Then you get to nested loops like:
List deck = new ArrayList(52);
for (Suit suit : Suit.VALUES)
for (Rank rank : Rank.VALUES)
deck.add(new Card(suit, rank));
Collections.shuffle(deck);
and you see the beauty come through (and it just works... no chance to screw up a "i.next();".
Amazing !
regards
[ July 09, 2003: Message edited by: HS Thomas ]