Re:IF-less programming
by raverbashing on Friday December 28, 2012 @07:51AM
(#4977486)
Ok, with that I can agree.
Or maybe better: how can ifs be replaced (sometimes) using OO principles
My take on why ifs are "bad" is that they are statements, just like for, while, switch and others. Being statements they can't be composed as you would do with expressions.
Re:IF-less programming
by dragonwriter on Friday December 28, 2012 @12:38PM
(#4978539)
That's not universally true; there are languages where if is an expression rather than a statement (e.g., Ruby.)
It is partially my fault because I failed to express what I really ment. English not my native, so sorry.
What I really ment in this sentece is "why using (a lot of) ifs can be a bad practice in a Object Oriented language"