-2

This question is related to questions discussed at here (To reduce meta-effect, I don't paste the question links here:( ), but now I'm not arguing the linked questions.

I hope I can describe the situation at below clearly...

Asking whether you should catch throwable is ok, while asking if using recursion in constructor is not ok, because there are objective reasons(answers) to not catching throwable.

But sometimes, I even don't know if there is an objective reason(answer) in the question, for example, I see X is rarely used but the reason isn't clear, can I specify finding objective answers for my question to prevent close votes? For example, can I ask "Is there any objective reason that we should not use X" if I don't know whether X really cause some problems or it is just a coding habit ?

2
  • Some might argue that whether or not a question has objective answers is, in itself, debatable, and vote to close on those grounds. Others might say "it's personal preference", and vote to close on those grounds, implying that the close reason is the answer (which is pretty stupid IMO).
    – BoltClock Mod
    Commented Nov 25, 2015 at 8:12
  • 1
    @BoltClock I'm not sure whether your comment is opinionated or recursive. You should not post such stuff until after I've had at least four coffees. Commented Nov 25, 2015 at 10:38

1 Answer 1

0

I'm not sure what you're asking. It seems like you want to resume the discussion found in the meta post you're linking to. I'll iterate my interpretation of the parts of the answers to the original question that I agree with:

The difference in the two is mainly specificity: The catching throwable question is very brief and asks why something is wrong, so answerers can pat themselves on the back as they answer you as opinion-based as they like. The recursive constructors question contains more code and tries to start a discussion, so answering is under the premise that it contains opinion. The discussion is well-intended, but inevitably does the question a disservice. If you wanted feedback for your specific blob of code, rather than the principle of whether to ever make recursive constructors, perhaps Code Review would have been better.

The subject is discussed in a bunch of other posts like Is a "best practice" question off topic?. You could probably phrase your question differently and not have it closed. At least, that's what seems to be the case here:

E.g.:

Is it bad practice to use recursion in constructors?

For example, something like this:

public MyTreeNode(int depth)
{
    this.depth = depth;
    if (depth > 0) {
        this.left = new MyTreeNode(depth / 2);
        this.right = new MyTreeNode(depth / 2);
    } else {
        this.left = null;
        this.right = null;
    }
}

Is it bad practice, or should I try to resolve this using regular functions?

I was recently the subject of a similar process on Code Review: Fetching a set of event IDs from a database based on a set of company IDs -- check out the edit history and this meta post to see how I went from a very negative rating with unconstructive responses (that were eventually made redundant and got deleted by their answerers) to a positive rating with constructive feedback all because of how I rephrased the question.

You must log in to answer this question.

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