I was talking in terms of the constructs which the language can provide to avoid ifs.
> And suggests that this is better:
It depends in what terms are you thinking. A syntactic improvement is a also a benefit, isn't it?
> And suggests that this is better:
It depends in what terms are you thinking. A syntactic improvement is a also a benefit, isn't it?
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".