tungwaiyip.info

 

home

about me

links

my software

Media

Yucatán Photos

St Lucia Photos

Photo Album

Videos

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 (0)

 

 

Comments (0)

past articles »

 

BBC News

 

UN agrees DR Congo troop increase

 

No agreement for US car bail-out

 

'Experts' lead Saudi tanker talks

 

US warned of China 'cyber-spying'

 

Hebron settlers desecrate mosque

 

US judge orders Algerians freed

 

US convicts Syrian arms dealer

 

S Africa to cut aid to Zimbabwe

more »

 

Slashdot News for nerds, stuff that matters

 

Resurrecting the Mighty Mammoth, Cheaply (2008-11-20T23:34:00+00:00)

 

Unix Dict/grep Fixes Left-Side-of-Keyboard Puzzle (2008-11-20T22:40:00+00:00)

 

Kaminsky Bug Options Include "Do Nothing," Says IETF (2008-11-20T21:46:00+00:00)

 

Search For the Tomb of Copernicus Reaches an End (2008-11-20T21:00:00+00:00)

 

Apple DMCAs iPodHash Project (2008-11-20T20:18:00+00:00)

 

Network Neutrality — Without Regulation (2008-11-20T19:32:00+00:00)

 

Lessig, Zittrain, Barlow To Square Off Against RIAA (2008-11-20T18:47:00+00:00)

 

Study Recommends Online Gaming, Social Networking For Kids (2008-11-20T18:02:00+00:00)

more »

 

SF Gate

 

Dems delay auto bailout vote, seek plan from Big 3 (20 Nov 2008)

 

Judge orders release of 5 terror suspects at Gitmo (20 Nov 2008)

 

Congress rushes to extend jobless benefits (20 Nov 2008)

 

Dems: Napolitano emerges for Homeland Security job (20 Nov 2008)

 

Daly City nonprofit's ex-treasurer pleads no contest to embezzlement (20 Nov 2008)

 

Calif. cities consider green alternatives to lawns (20 Nov 2008)

 

Calif. commuter train in crash; minor injuries (20 Nov 2008)

 

Paulson: crisis happens once or twice in 100 years (20 Nov 2008)

 

Ecuador audit recommends default on 40 pct debt (20 Nov 2008)

 

Gap's 3Q profit edges up 3.4 percent on cost cuts (20 Nov 2008)

 

Report card: Patients less satisfied with HMOs (20 Nov 2008)

 

World stocks down amid fears of deep recession (20 Nov 2008)

 

Dems delay auto bailout vote, seek plan from Big 3 (20 Nov 2008)

 

Oil at 3-year lows; gas below in 23 states (20 Nov 2008)

more »

 

Asia Times Online

 

Tokyo itches to take on pirates (20 Nov 2008)

 

China all at sea off Africa (20 Nov 2008)

 

The jolly life of a pirate ring (20 Nov 2008)

 

The US strikes deeper in Pakistan (20 Nov 2008)

 

UMNO has stubborn staying power (20 Nov 2008)

 

Syria and Britain all ears now (20 Nov 2008)

 

Tibet movement veers from 'middle way' (20 Nov 2008)

 

China serves up mega-buck banquet (20 Nov 2008)

 

SPEAKING FREELY : The evil of the US dollar (20 Nov 2008)

 

TARP flip-flop true to form (20 Nov 2008)

 

Bankruptcy is key for Detroit survival (20 Nov 2008)

 

THE MOGAMBO GURU : Fed up with Fed credit (20 Nov 2008)

more »

 


Site feed Updated: 2008-Nov-20 15:15