Quantcast
Channel: User Armin Ronacher - Stack Overflow
Viewing all articles
Browse latest Browse all 43

Answer by Armin Ronacher for Purpose of "let expression" (LetExpr) in the Java compiler?

$
0
0

Generally speaking, why does it exist?

It exists for autoboxing as Google suggests.

If you have code like this:

Integer foo = 0;foo++;

Java internally makes this into this helper expression:

Integer foo = 0;let int foo_helper = foo.intValue() in foo_helper++;

Source: https://bugs.java.com/bugdatabase/view_bug?bug_id=6614974

That expression obviously has no syntax representation, it's just an AST level transformation to simplify compilation.


Viewing all articles
Browse latest Browse all 43

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>