4 ms·
I've said 'in general' several times. I shy away from inline side effects because in general I do not intuitively understand how they sequence. I'd rather just
by chrisseaton 8y ago
I've said 'in general' several times.
I shy away from inline side effects because in general I do not intuitively understand how they sequence. I'd rather just avoid in general.
- Retra 8y agoThat's your prerogative then, isn't it?
- chrisseaton 8y agoWhat 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.
- deleted 8y ago[deleted]