4 ms·
Aside from the obvious deficiencies, who the heck writes code like "if ($false === initVector)"? Is this a side effect of people who speak other languages with
by spilk 10y ago
Aside from the obvious deficiencies, who the heck writes code like "if ($false === initVector)"? Is this a side effect of people who speak other languages with different grammatical structures? Very odd to read through code written "backwards" like that.
- theresistor 10y agoIt's a code pattern from C. It guards against accidentally using = instead of == or ===.
- taspeotis 10y agoI believe it's a once-popular way to avoid this mistake: if (variable = false) // == intended Which is valid in C and some other languages. But if (false = variable) Is not valid.
- spilk 10y agoThat makes way more sense than I would have thought. Thanks. Guess I've been away from C for a while.
- Theodores 10y agohttps://en.wikipedia.org/wiki/Yoda_conditions https://en.wikipedia.org/wiki/Yoda_conditions Yoda code, Wordpress introduced me to the phrase.