News for hackers. Stuff that matters.
Re:IF-less programming by mattvanhorn on Friday December 28, 2012 @10:17AM (#4977967)
If the idea is to keep the intent clear, the or statement is a much better choice, even if less familiar.

"I want to set param to the object property or the default" is much clearer than "I want to check if if I have an object property and if I do then I'll set the param to the object property otherwise I'll set the param to the default"

That is just mixing in a lot of noise about how you do it instead of just what you are doing.

There are no comments on this comment yet.