platform-jep to this point

Brian Goetz brian.goetz at oracle.com
Mon Mar 14 14:33:48 UTC 2016


Don’t worry, there’ll be another round of survey input for this sort of stuff before we’re done. 

As the over 2000 survey responses show, doing this on the mailing list is not going to scale, and it doesn’t take much before a hundred-message thread breaks out.  So please, respect the request to not use the list for this.  Thanks!  



> On Mar 14, 2016, at 7:09 AM, Glen Peterson <glen at organicdesign.org> wrote:
> 
> I just completed the survey, then read the entire message archive for
> this list.  I put most of my ideas in the survey, but I have a few
> responses that I thought of after the survey (or weren't asked there).
> 
> Re: Local Variable Type Inference
> http://mail.openjdk.java.net/pipermail/platform-jep-discuss/2016-March/000039.html
> 
>> 10. What do you mean by "action at a distance"?
>> 
>> var x = "Some String";
>> ...
>> x = 42;
> 
> Great example.  Why not just add type inference for `final` variables?  It:
> - Uses an existing language term without changing its meaning
> (doesn't break old code)
> - Prevents the above re-assignment issue entirely
> - Encourages lazy programmers to prefer immutability because the
> syntax is shorter (they don't have to specify any types).
> 
> 
> Question:
> "The problem with intersection types is that in the general case, when
> you have a type like C & I1 & I2 ... &  In, how do you pick the 'best'
> type?" - Maurizio
> 
> Answer:
> The compiler can't read the user's mind.  The user has to specify the
> type they want the old fashioned way, or accept a potentially
> complicated intersection type.  Please be as slow as possible to infer
> Object as that's just not useful type inference in any situation
> except `var x = new Object()`.  Scala infers Any (it's ultimate
> super-type) too often and it's incredibly frustrating.
> 
> -- 
> Glen K. Peterson
> (828) 393-0081
> 
> 11110 000
> 10 011111
> 10 011001
> 10 000010



More information about the platform-jep-discuss mailing list