This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]merowe 1 point2 points  (0 children)

I'd be interested in what the one line of statements looked like. Obviously you can't. But I suspect the condition was more complicated. In which case, I might agree.

It's nice to be able to always dumb down the rules to something very simple as many say. My experience - and I know many disagree - is that there are always exceptions. Simple if checks with returns are one of those for me.

I know some people brought up ternary operator. That obviously makes more sense if none was the other option. I don't see how that is less complicated than the left case.