RFR: JDK-8192963/JDK-8206986 JEP 325: Switch Expressions (Preview)

B. Blaser bsrbnd at gmail.com
Fri Jul 20 14:05:39 UTC 2018


On 19 July 2018 at 21:41, Jan Lahoda <jan.lahoda at oracle.com> wrote:
> Hi Bernard,
>
> On 19.7.2018 18:49, B. Blaser wrote:
>>
>> Hi Jan,
>>
>> On 17 July 2018 at 20:00, Jan Lahoda <jan.lahoda at oracle.com> wrote:
>>>
>>> Hi,
>>>
>>> As JEP 325 is in the proposed to target state, I thought it might be a
>>> good
>>> idea to start a review process for the code.
>>>
>>> The code here strives to implement the current specification for the
>>> Switch
>>> Expressions:
>>> http://cr.openjdk.java.net/~gbierman/switch-expressions.html
>>>
>>> The current webrev is here:
>>> http://cr.openjdk.java.net/~jlahoda/8192963/webrev.00/
>>
>>
>> Going back to thread [1], I'd like to suggest some cosmetic changes to
>> 'LetExpr':
>> * 'LetExpr.defs' could be renamed to 'LetExpr.stmts'
>> * 'LetExpr' could be renamed to 'BlockExpr'
>> * 'Pretty' could print '(exec ... eval ...)' instead of '(let ... in ...)'
>
>
> Good points. On the other hand, I am not sure if it is good to complicate
> this patch (esp. with a rename to BlockExpr). Maybe we could work on the
> LetExpr improvements and then rebase the switch expressions patch on that?

I guess you're right.
We can to that before or after the integration of switch expressions
not to complicate this patch.

I can take a look at this soon (probably after the integration) unless
you want to?

Thanks,
Bernard


> Thanks,
>     Jan
>
>
>>
>> I also note that [2] could be finally addressed but probably separately.
>>
>> Cheers,
>> Bernard
>>
>> [1]
>> http://mail.openjdk.java.net/pipermail/compiler-dev/2017-May/010954.html
>> [2] https://bugs.openjdk.java.net/browse/JDK-8183548
>>
>>
>>> (includes a list of new errors.)
>>>
>>> JBS:
>>> https://bugs.openjdk.java.net/browse/JDK-8192963
>>> https://bugs.openjdk.java.net/browse/JDK-8206986
>>>
>>> CSRs:
>>> https://bugs.openjdk.java.net/browse/JDK-8207241
>>> https://bugs.openjdk.java.net/browse/JDK-8207406
>>>
>>> Any feedback is welcome!
>>>
>>> Thanks,
>>>      Jan


More information about the compiler-dev mailing list