4
\$\begingroup\$

This question looks like OP is worried about DRY and perhaps readability of a one-liner ternary.

I have a bias against one-liners and other narrowed-down questions, but there's a consensus about them being reviewable and on-topic, and besides there's no "too narrow" close reason.

Regardless of my own bias against one-liners, the question feels, and prompts answers that are, Stack Overflow -ish. I don't think that question (and even its accepted answer) contribute to the overall site's content quality.

But I'm at a loss with finding an appropriate reason to close it. Would "unclear what you're asking" be appropriate in this case?

\$\endgroup\$
4
\$\begingroup\$

I've closed it as hypothetical code, since the identifiers are completely generic.

\$\endgroup\$
  • \$\begingroup\$ I like how your comment tells the OP that the null-checking problem might possibly be avoided altogether if he provided enough context for a decent peer review. \$\endgroup\$ – Mathieu Guindon Jun 17 '14 at 18:11
5
\$\begingroup\$

The most common use I have seen for "Unclear what you are asking" is when the OP has provided lots of code but with little or no description about what the code does.

Besides this, I tend to have another rule-of-thumb: If you read the complete question more than three times and have no slightest clue about what the OP is talking about, then you can close as "unclear what you are asking". This rule-of-thumb mostly applies to questions written with poor English. So poor English that they can't even be edited to be made clearer.

\$\endgroup\$

You must log in to answer this question.

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