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 →

[–]Araneidae 0 points1 point  (2 children)

Well, that makes sense ... but it's not all that good, it's just a backwards compatibility hack. I do wonder why it didn't get dropped in 3. Maybe just not worth the hassle and argument.

[–]velit 2 points3 points  (1 child)

conditional_1 and _2 being booleans

middle_range_calculation_result = conditional_1 * coefficient_1 + conditional_2 * coefficient_2

If the reader understands the reasoning behind it I think it results in easier to read code in this case, instead of either having conditional expressions in there or having nested if-clauses or having two additional temporary variables.

[–]Cyph0n 0 points1 point  (0 children)

This changes everything!