JDK 10: Refactoring of LetExpr to allow more than one statement
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Wed May 10 21:00:41 UTC 2017
Hi,
I think that we're I'd like to see things moving is more in the
direction of block expressions, which allow even more freedom. That is,
a list of statements (maybe var decls, but maybe not), followed by an
expression (which is the expression value). I think this could be a
powerful tool that could come handy for some of the features discussed
under the Amber umbrella. So, I agree with you that LetExpr should be
improved, but I guess I'm in for a more radical overhaul ;-)
Maurizio
On 10/05/17 21:14, B. Blaser wrote:
> Hi,
>
> I've suggested some time ago a refactoring of LetExpr to generate a
> more optimized code in some cases, see [1].
>
> The key idea is to allow LetExpr to have more than one statement in
> addition to multiple variable declarations. This would lead to a more
> optimal translation of comma-expressions, see [1].
>
> This suggestion refers to let-expressions in Lisp which allow more
> than one statement in addition to multiple variable declarations, see
> [2].
>
> Are you interested in such a feature? Should I create a JBS issue for
> that to be integrated in JDK 10?
>
> Regards,
> Bernard
>
> [1] http://mail.openjdk.java.net/pipermail/compiler-dev/2016-November/010531.html
> [2) http://www.lispworks.com/documentation/HyperSpec/Body/s_let_l.htm
More information about the compiler-dev
mailing list