The Artima Developer Community
Sponsored Link

Java Buzz Forum
Neal Gafter's proposal for constructor type inference

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Rajiv Shivane

Posts: 36
Nickname: shivane
Registered: Jul, 2004

Rajiv Shivane heads the PRC Group at Pramati Technologies
Neal Gafter's proposal for constructor type inference Posted: Jul 6, 2007 3:11 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Rajiv Shivane.
Original Post: Neal Gafter's proposal for constructor type inference
Feed Title: 0xCAFEFEED
Feed URL: http://feeds.feedburner.com/cafefeed
Feed Description: Thoughts on JavaTM/J2EETM and related technologies
Latest Java Buzz Posts
Latest Java Buzz Posts by Rajiv Shivane
Latest Posts From 0xCAFEFEED

Advertisement

Neal gafter has proposed that java language include Constructor Type Inference in order to reduce verbosity. So what was

Map<String,List<Thing>> map = new HashMap<String,List<Thing>>();

looks like:

Map<String,List<Thing>> map = new HashMap<>();

Though there is an alternate proposal to deduce the LHS type instead, like:

map := new HashMap<String,List<Thing>>();

I find Neal's proposal more appealing and more natural to java. It feels so Java, that I have already used it thrice since morning only to be surprised by IDEA's warnings! So, if anyone is counting votes, +1 from me.

Read: Neal Gafter's proposal for constructor type inference

Topic: What&#39;s the Europa buzz? Previous Topic   Next Topic Topic: The Smell of Java (& JSP) or A Case for Java

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use