News for hackers. Stuff that matters.
Re:New Programming Jargon by kdeberk on Sunday May 09, 2010 @05:37PM (#1332907)
I'm actually guilty of using Yoda conditions in anything but Lisp. It is now hardwired in my brain since I learned it early. I'm using it for the same reason as all other Yoda conditioners are, -Wall wasn't really an option then since the source code normally spouted 50+ warning lines due to some included header file.
Re:New Programming Jargon by squidsoup on Sunday May 09, 2010 @06:25PM (#1332968)
I liked the variation on this - Yoda Exception Handling (or the lack thereof): there is no try.
Re:New Programming Jargon by jallmann on Sunday May 09, 2010 @05:57PM (#1332938)
I use them too, but can't figure out if TFA is being derisive or not. I always thought Yoda conditions were good defensive programming, especially in C-type languages.
Re:New Programming Jargon by aaronbrethorst on Sunday May 09, 2010 @06:09PM (#1332950)
I use Yoda conditions all the time. Never knew there was a name for it besides 'a good defensive programming convention to keep you from doing something stupid when programming C.'