From: Michal Kleczek on
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
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
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
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
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/
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Prev: Putting passwords in a properties file?
Next: Interview