On Tue, May 5, 2009 at 1:56 PM, Thomas Müller <[email protected]> wrote: > Hi, > > I'm not proposing to use Google Collections, but it does have the > 'missing' methods: > > import com.google.common.collect.Maps; > import com.google.common.collect.Arrays; > HashMap<String, WorkspaceInfo> wspInfos = Maps.newHashMap(); > ArrayList<DataIdentifier> list = Arrays.newArrayList(); > >> since when is less verbose automatically easier to read? > > Probably your are right, reading things twice is better. Probably your > are right, reading things twice is better. :-)
i think that it's important to differentiate between the declared type and the created object. for example, i would never write: HashMap<String, WorkspaceInfo> wspInfos = Maps.newHashMap(); but Map<String, WorkspaceInfo> wspInfos = Maps.newHashMap(); sure, if this would be in the jdk, i would use it (because everyone else would use it too). i think we should first focus of cleaning up the code by replacing untyped collections and integer enums. regards, toby
