Re: Feedback wanted: switch expression typing

2018-03-29 Thread Brian Goetz
There’s a middle ground, which is: to pursue B now, in conjunction with trying to evolve the rules for conditionals over time by proceeding from warning to error. That gets us to a consistent and simpler place in the long run while mitigating the effect of a sudden inconsistent change. > On

Re: Feedback wanted: switch expression typing

2018-03-29 Thread Liam Miller-Cushon
On Wed, Mar 28, 2018 at 3:55 PM Dan Smith wrote: > Subjectively, big picture: how concerned would you be about changing > typing rules in these cases? > My initial impression is that the compatibility impact of (C) would be manageable, especially with the change you

Re: Records -- current status

2018-03-29 Thread Brian Goetz
The idea of factoring out the defaults somewhere close by isn't intrinsically objectionable (though the suggestion to factor them all the way into the module descriptor is horrible), but it makes me unhappy for a different reason -- it creates the impression that there are two kinds of

Re: Records -- current status

2018-03-29 Thread Remi Forax
- Mail original - > De: "Guy Steele" > À: "Brian Goetz" > Cc: "amber-spec-experts" > Envoyé: Jeudi 29 Mars 2018 21:25:56 > Objet: Re: Records -- current status > I've always assumed that, eventually,

Re: Records -- current status

2018-03-29 Thread Brian Goetz
What else could we do? Don't take these random ideas too seriously, but: maybe the declaration is a "mutable record"? Or just a "class", with some other signal that many record-like features are relevant? Or maybe the mutable fields appear in a different context? I feel like we could

Re: Records -- current status

2018-03-29 Thread Dan Smith
This reads harsher than I intended, due to me efforts to be brief. So let me elaborate a little: > On Mar 28, 2018, at 5:47 PM, Dan Smith wrote: > >> On Mar 20, 2018, at 8:15 AM, Brian Goetz > > wrote: >> >>>

Re: Feedback wanted: switch expression typing

2018-03-29 Thread Tagir Valeev
Hello! Existing ?: behavior is certainly surprising and continuous source of puzzlers. E.g. the following was used in our latest Java Puzzlers NG S03 talk: boolean x = false; System.out.println(x ? 42 : null); // prints null System.out.println(x ? 42 : x ? 42 : null); // NPE It's really hard to