Skip to main content
5 events
when toggle format what by license comment
Apr 11, 2023 at 21:35 comment added Abion47 Regarding while (0 < int), it's called a Yoda condition, and the general benefit is that it's resilient to some classes of errors. (i.e. if (foo = 0) would result in an assignment but if (0 = foo) would result in a compile-time error.) That said, many languages nowadays have linters that warn against such things, so IMHO it's not worth the steep impact to readability.
Apr 11, 2023 at 15:40 history edited J_H CC BY-SA 4.0
added 202 characters in body
Apr 11, 2023 at 15:26 history edited J_H CC BY-SA 4.0
added 1751 characters in body
Apr 11, 2023 at 13:32 vote accept rfl890
Apr 11, 2023 at 4:34 history answered J_H CC BY-SA 4.0