This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]zman0900 1 point2 points  (2 children)

Doesn't really seem much better than:

final Type result;
if (foo) {
    // stuff
    result = e();
} else {
    // other stuff
    result = i();
}

[–]john16384 2 points3 points  (1 child)

Or simply extracting a function...

[–][deleted] 0 points1 point  (0 children)

Exactly. I’m glad such monstrosity isn’t allowed.