top | item 34845353

(no title)

jasonzemos | 3 years ago

If one of the variables preceding the `if` has side-effects then it's inferior to the specified lazy-evaluation of the `if`. Any external function not annotated pure will be called to assign those variables which otherwise wouldn't have been if it was packed into the `if`.

This is actually something I think the C++ standard should address soon. There are cases when extern functions which aren't appropriately pure are still "optional." The example par excellence is debug logging, should one choose to not use macros.

discuss

order

No comments yet.