What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

I asked the question To if, or not to if? and it was closed for being "primarily opinion-based".

I'm wondering how the original wording came across as something that had an opinion-based answer. Can someone please clarify what was opinion-based about it so I can avoid this situation in the future?

share|improve this question
1  
All the answers you will get are opinions of programmers. That's opinion-based. –  juergen d Dec 8 '13 at 6:31

1 Answer 1

up vote 4 down vote accepted

Your question is:

Why do some programmers do this?

You've already noticed some do and some don't. It's a matter of opinion/style/preference: the two pieces of code you show are semantically equivalent, so selecting one or the other isn't done on technical merits/semantics, it's done based on each dev's preference (or coding style guidelines, or ...).

That's not the type of question Stack Overflow deals with. We don't like emacs vs vi or tabs vs spaces debates either, for the same reason.

share|improve this answer
    
It's true that I asked Why do some programmers do this?, but immediately after that question I was asking, more specifically, Is there any programmatic benefit to this alternative method, or is it just a shorthand/preference?. Why do some programmers do this? was a rhetorical question that lead into my second question, but I suppose I will just have to avoid this style of question-asking. Thanks for the clarification. –  Mister Dood Dec 8 '13 at 6:38
    
Your title wasn't really good either - I changed it to something that actually tells something about what's in the question. (Feel free to roll-back if you don't like it, I'm not good with titles.) Last thought: "any language" is too broad/a bit dangerous in a question. Some languages don't have short-circuit evaluation, in that case the statements aren't equivalent. In general, pick one specific language for your questions. –  Mat Dec 8 '13 at 6:42
    
That seems like an improvement. I wasn't really sure what the technique/preference was called, so I didn't even know where to begin with the question title. Thanks again. –  Mister Dood Dec 8 '13 at 6:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .