I have seen this practice refered to as "Yoda conditionals" but never knew the reason for it. Although it reads wrongly (to me), I can now see the logic.
A lot of the code I write is JavaScript in Aptana, which has a real-time JSLint checker that warns against assignments in conditionals.
Comments
I have seen this practice refered to as "Yoda conditionals" but never knew the reason for it. Although it reads wrongly (to me), I can now see the logic.
A lot of the code I write is JavaScript in Aptana, which has a real-time JSLint checker that warns against assignments in conditionals.
I have never heard it called "Yoda conditionals" before. That is awesome.