Hacker News new | past | comments | ask | show | jobs | submit login

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.



I liked the variation on this - Yoda Exception Handling (or the lack thereof): there is no try.


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.


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.'




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: