Prev: Putting passwords in a properties file?
Next: Interview
From: Michal Kleczek on 30 Sep 2009 10:58 Michal Kleczek wrote: > I think it is enough to write (I don't get any compiler warnings): > HashMap<String, List<MyThing>> x = new HashMap(); > > so there is type inference here - it is just the other way around :) Sorry - it looks like it is just NetBeans not showing any warning. -- Michal
From: Lew on 30 Sep 2009 16:06 Michal Kleczek wrote: > > I think it is enough to write (I don't get any compiler warnings): > > HashMap<String, List<MyThing>> x = new HashMap(); > > > so there is type inference here - it is just the other way around :) > > Sorry - it looks like it is just NetBeans not showing any warning. > Then you should turn on the warning in NetBeans. Menu: Tools / Options / Editor / Hints tab -- Lew
From: Michal Kleczek on 1 Oct 2009 02:01 Lew wrote: > Michal Kleczek wrote: >> > I think it is enough to write (I don't get any compiler warnings): >> > HashMap<String, List<MyThing>> x = new HashMap(); >> >> > so there is type inference here - it is just the other way around :) >> >> Sorry - it looks like it is just NetBeans not showing any warning. >> > > Then you should turn on the warning in NetBeans. > > Menu: Tools / Options / Editor / Hints tab > You are right, thanks. As a long time Eclipse user I am a bit shocked that the fresh install of NetBeans has the whole "Standard javac warnings" option unchecked there. -- Michal
From: Jeff Higgins on 3 Oct 2009 08:27 John B. Matthews wrote: > In article <7ig1fsF319h9fU1(a)mid.individual.net>, > Mike Amling <mamling(a)rmcis.com> wrote: > >> Surely someone somewhere must have something like this already, with >> classes or interfaces for time, distance, mass, etc. > > JSR-275: <http://jscience.org/api/index.html> > <https://jscience.dev.java.net/servlets/ReadMsg?list=dev&msgNo=654>
From: Robert Klemme on 3 Oct 2009 08:39
On 30.09.2009 03:56, Arne Vajhøj wrote: > Lew wrote: >> Michal Kleczek wrote: >>> 2. First class type parameters ( "new T()" anybody? :) ) > And so natural that it would not add to the complexity of > the language. I am not sure I can follow you here: you add a new feature to the type system and yet claim that it does not increase the complexity of the language. I do not believe this. We could argue about the level of complication that this adds but it's certainly larger than zero. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ |