3 ms·
What does the JVM language specification say about this? That's a pretty universal opinion we can all agree to follow. 15.7, Evaluation Order: > It is recomme
by chrisseaton 8y ago
What does the JVM language specification say about this? That's a pretty universal opinion we can all agree to follow.
15.7, Evaluation Order:
> It is recommended that code not rely crucially on this specification. Code is usually clearer when each expression contains at most one side effect, as its outermost operation, and when code does not depend on exactly which exception arises as a consequence of the left-to-right evaluation of expressions.
So when I review I advise, as per the spec, that expressions contain a single side effect.