2

Should classes with public non-virtual destructors be marked "final"?

In what way is it different from this other good question that was not closed? In C++, should I almost always use virtual inheritance?

6
  • Design approrach X has some features. Some will see feature Y as an advantage, some as a disadvantage, hence opinion-based, hence off-topic. Commented Aug 25, 2015 at 0:09
  • 1
    @Jon I don't think his question is a bad one. "final" makes a very non opinion-based change to the code. He could very well remove the "advantage/disadvantage" part and ask the same thing with "why should I mark classes..."; "what are the implications of..." - probably a duplicate but certainly not opinion-based.
    – Daniel
    Commented Aug 25, 2015 at 0:21
  • Haven't read the question, but the title has me reaching for the close vote button already. "Advantages and disadvantages of X" is clearly too broad
    – JK.
    Commented Aug 25, 2015 at 1:11
  • 1
    The C++ question was asked 5 years ago, and guidelines evolve over time (and other Stack Exchange sites are created). Existence of a prior question isn't really relevant; what matters is whether the question fits the guidelines in effect at the time the question is asked.
    – Ken White
    Commented Aug 28, 2015 at 1:58
  • 3
    Why are people downvoting this question? Someone is asking how to better adhere to our site's guidelines and expectations. Why discourage that?
    – skrrgwasme
    Commented Aug 28, 2015 at 4:18
  • I don't think this question is totally equivalent to "what is the advantage of...",at least I think the function of "final" is quite base on fact, it can be answered with less opinion by explaining the function or mechanism of "final"
    – ggrr
    Commented Aug 28, 2015 at 8:57

1 Answer 1

4

That post, in its current form, can be closed for the following reasons.

  1. Too broad
    • Any answers to the question will be extremely long, your question should be able to be answered with a few paragraphs or less.
    • If your question could take up an entire chapter in a programming book, it is probably too broad for Stack Overflow.
  2. Primarily Opinion Based
    • Questions that don't have a concrete answer are generally going to be based on opinions and not facts.
  3. Unclear What You're Asking
    • It is unclear exactly what your question is asking, which adds to the Too Broad close reason.
  4. No MCVE
    • Generally, questions on Stack Overflow should be about a specific programming problem, so you should include some code demonstrating the specific programming problem.
    • There are some exceptions to this rule but, as far as I can tell, your question is not one of those exceptions.

I don't think that there is actually any way of salvaging that question without completely changing the question. If you asked about a specific problem relating to the concept that you're asking about, possibly. But, if you're asking about the upsides and downsides of a certain method, it will probably be closed for the same reasons above.

In its current form, your question is off-topic for programmers.stackexchange.com, see Discuss this ${blog}, What is the problem with “Pros and Cons”? and What goes on Programmers.SE? A guide for Stack Overflow. However, you may have an easier time editing it to be on-topic there. Keep in mind that their rules about what can or cannot be asked are more strict than Stack Overflow's rules. If that is what you end up doing, I want to stress that you read the information available in their help center about how to ask questions, what topics can be discussed and what topics cannot.

Also, if you have working code and you would like others to review it to suggest possible down-sides there is also codereview.stackexchange.com, but their rules are just as strict as prog.se so make sure you read the relevant help center information there as well before posting your question

However, there might be no amount of editing that can make your question on-topic on any Stack Exchange site. In which case, there is simply nothing you can do about it.

8
  • this question is a very poor fit for Programmers - it would be quickly voted down and closed over there, see Discuss this ${blog} and What is the problem with “Pros and Cons”? Recommended reading: What goes on Programmers.SE? A guide for Stack Overflow
    – gnat
    Commented Aug 25, 2015 at 1:12
  • That's why I said "may be", and mentioned reading the help center information, but thanks for the relevant links.
    – user4639281
    Commented Aug 25, 2015 at 1:14
  • consider editing to stress that as written, the question may have a bad luck over there
    – gnat
    Commented Aug 25, 2015 at 1:28
  • 2
    Edited. Does that work better?
    – user4639281
    Commented Aug 25, 2015 at 1:34
  • 1
    I am not disagreeing what you say, just think the answer is still not explaining/deducing why this (specific) question is closed very clearly, it is just repeating the rules , it is better to explain which part/keyword is too broad/opinion based (e.g.:is "final" too complex to explain? is the usage of "final" opinion based? "There are some exceptions to this rule" then which is the exception case?...).
    – ggrr
    Commented Aug 28, 2015 at 9:10
  • "I don't think that there is actually any way of salvaging that question without completely changing the question. If you asked about a specific problem relating to the concept that you're asking about, possibly. But, if you're asking about the upsides and downsides of a certain method, it will probably be closed for the same reasons above." Pretty much the entire question is the problem, that's why I said I didn't think it could be salvaged through editing. @amuse.
    – user4639281
    Commented Aug 28, 2015 at 14:08
  • In my opinion, you can bold that sentence or put it to the first paragraph.
    – ggrr
    Commented Aug 31, 2015 at 4:28
  • I bolded the first sentence of that paragraph @amuse.
    – user4639281
    Commented Aug 31, 2015 at 13:25

You must log in to answer this question.

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