tungwaiyip.info

home

about me

links

Blog

< May 2003 >
SuMoTuWeThFrSa
     1 2 3
4 5 6 7 8 910
11121314151617
18192021222324
25262728293031

past articles »

Click for San Francisco, California Forecast

San Francisco, USA

 

New Language Features in JDK 1.5

This slashdot posting points to an interview with Joshua Bloch on the New Language Features in JDK 1.5. Generics is a much awaited enhancement. Today, without the language support, I ask every programmer to minimally document the data type used in a comment, like

  Map userTable;   // username(String) => UserRecord

Still many people fail to do just that. I have to track down the usage of the collection to deduce what data type they are using :(

A generic declaration would be

  Map<String, UserRecord> userTable;

This seems to keep Java collection's light-weight design. It provides some compile time checking and implicit typecasting without the complexity of C++'s template. I still remember spending a lot time debugging the COMPILATION in C++. An compiler error message would spend multiple lines with long and unreadable class names decompose of a template instances...

One reader has pointed out the work on JSR 166 Concurrency Utilities led by Doug Lea. Doug Lea's book Concurrent Programming in Java and the programming library is definitive in this area. It is great that it gets formalized and included in JDK.

2003.05.09 [, ] - comments

 

 

blog comments powered by Disqus

past articles »

 

BBC News

 

Zimbabwe troops accused of 'systematic torture' of protesters (23 Jan 2019)

 

Brexit delay worse than no deal - minister (23 Jan 2019)

 

Emiliano Sala: Missing Cardiff City FC player 'sent message from plane' (23 Jan 2019)

 

Niagara Falls becomes a 'winter wonderland' (23 Jan 2019)

 

Yang Hengjun: Australia seeks information on writer 'missing' in China (23 Jan 2019)

 

Social media stars agree to declare when they post ads (23 Jan 2019)

 

Sabarimala: India woman who defied temple ban 'abandoned' by family (23 Jan 2019)

 

Priyanka Gandhi launches political career ahead of key India polls (23 Jan 2019)

 

Kevin Barnett: Sitcom writer and stand-up comedian dies aged 32 (23 Jan 2019)

 

Venezuela opposition set for mass protest against Maduro (23 Jan 2019)

more »

 

SF Gate

 

Ship traffic, January 23 (22 Jan 2019)

 

'I'm so fed up': With shoplifting all too frequent in Hayes Valley, some merchants are at wits' end (22 Jan 2019)

 

The highest-paying job in California isn't in tech, but a more traditional sector (22 Jan 2019)

 

AI policy is tricky. From around the world, they came to hash it out (22 Jan 2019)

 

EU’s antitrust cop lays groundwork for more tech scrutiny (21 Jan 2019)

 

Amazon knows what you buy, and it’s building a big ad business from it (21 Jan 2019)

more »


Site feed Updated: 2019-Jan-23 03:00