News for hackers. Stuff that matters.
Re:IF-less programming by jbrains on Friday December 28, 2012 @08:24AM (#4977577)
Yes, but that's probably a matter of familiarity over clarity. This is a perfect time to use the irrationally-dreaded ternary operator.

  param = object.property.nil? ? default_value : object.property
Verbose, although less so, but reveals intent almost perfectly. Would be better if the colon were "else" or "otherwise".

There are no comments on this comment yet.