-2

The version https://stackoverflow.com/revisions/204476/17 of question What should main() return in C and C++? as I post is simple in terms of what it's asking, but quite a long question because it lists 15 separate duplicates or related questions.

The problem with manual duplicate/related lists

  1. It's unclear whether there is much practical benefit because Stack Overflow has systems such as the "Linked Questions" sidebar which can be used to discover related questions.

  2. It makes the question much more verbose than it otherwise would be. This takes away from a "beautiful simplicity" that it otherwise could have.

  3. The manual list of duplicates needs to be constantly maintained. If any of the questions manually listed as a duplicate are reopened, the list becomes inaccurate and needs updating. Even if it is updated, this litters the revision history with meta-edits.

  4. There is a philosophical issue with not separating meta-content from actual question content. I have seen people take issue with this, and FAQ posts typically try to minimize the meta-content by formatting it as <sub>.

The benefits of a duplicate/related list

Of course, a manual list of related questions is always going to be more relevant than what an automated system can give you, at least if that list is well-curated. An human author can decide best which links offer the deepest insight, and are the best further exploration of a topic, and in what order.

Perhaps 15 links goes too far though, especially considering that this question is a canonical one.

What are your thoughts, and what should be done about it?

Is this kind of practice frowned upon? The list of links was not added by the author, but by another user, starting with this revision. Would it conflict with the author's intent if I simplified the list or removed it entirely? After all, the author didn't seem to mind their question being expanded with this list.

9
  • 1
    Sort of related but this question is on the list of duplicates, yet is not closed as duplicate: What are the valid signatures for C's main() function?
    – VLAZ
    Commented Sep 26, 2023 at 12:07
  • @VLAZ it was reopened by someone with a gold badge. That's a good find, because it also demonstrates that the list of duplicates might become inaccurate as questions get closed and reopened, and including them directly in the question thus require heavy maintenance. Commented Sep 26, 2023 at 12:09
  • 2
    Should it? Not necessarily. Should it be removed? Nah.
    – Cerbrus
    Commented Sep 26, 2023 at 12:09
  • 3
    I thought that due to the post being posted in 2008 the formatting pre-dated the dupe system, but they were initially added in 2013, which I believe was after the dupe system was added. If all those questions are duplicates, then closure is the correct process in my opinion, but I'm not an SME to tell if they are.
    – Thom A
    Commented Sep 26, 2023 at 12:10
  • @ThomA I think you've misunderstood the meaning of the list. The question links to other posts which are duplicates of itself. The question is not a duplicate of those others, but the other way around. Commented Sep 26, 2023 at 12:15
  • 3
    My point actually stands, if they are dupes, they don't need to be listed in the dupe target; they should just be closed as a dupe.
    – Thom A
    Commented Sep 26, 2023 at 12:18
  • @ThomA yeah I agree. Almost all of the questions manually listed are closed as duplicates already (of the question in question, or of some other question). Commented Sep 26, 2023 at 12:19
  • If someone did want to go away and find all the dupes, they can always use SEDE.
    – Thom A
    Commented Sep 26, 2023 at 12:20
  • 1
    For reference, here is a SEDE for all (undeleted) questions closed a duplicate of the question referenced.
    – Thom A
    Commented Sep 26, 2023 at 12:39

3 Answers 3

16

I don't see a benefit of trying to maintain a list of duplicates in the duplicate target. A question should be written as if it's being read for the first time as a question, not as a Wikipedia article.

The questions that are duplicates should be closed as duplicate of the target question; if someone ends up at those questions then they will either be automatically redirected or can view the duplicate by clicking the link in the banner. The canonical target should have all the relevant answers already. If not you might consider posting an answer on it that demonstrates a method shown on one of the other questions (just make sure you use your own words, and if needed cite other sources).

If someone does want to go away and find all the duplicates of a specific question then using a SEDE would be the best method in my opinion. It didn't take me more than a few minutes to write a SEDE for this specific question, and as it's parametrised can be used for any question on the site.

0
10

A question should not list its duplicates. There should be absolutely no such list in the question unless it is relevant for the understanding of the question.

There is a dedicated section for linked and related questions.

You can remove such a list from a question when you see it.

2

Purpose

There is a philosophical issue with not separating meta-content from actual question content. I have seen people take issue with this, and FAQ posts typically try to minimize the meta-content by formatting it as <sub>.

Where such content exists at all (there are still objections, but I assessed that the overall idea had sufficient support), the primary purpose should be to distinguish the questions, and add value as a directory. Linking duplicates is not directing people. Just like how two signs in the downtown core of a city, that point at each other and say "there is more of the city over there", are not useful.

This sort of directory helps people who find a close-but-not-quite question, and improves guidance for curators closing future questions. (Ideally, the related links will fit within the question preview in the closure dialog; the choice to use smaller text also helps with that, by the way).

There is no point in using a directory to point at questions that are deemed to be the same question, because actual duplicates should be centralized. The purpose of having canonicals is so that everyone only needs to read and contribute to one question, and all of the best information is in the same place.

Having a section like this also helps advertise a community consensus that the question is the canonical - this is not necessarily the oldest, nor the most viewed, nor the most upvoted, nor the highest-answer-count, nor even the highest-duplicate-count version of the question. In a perfect world, it would be all of those things, but none is guaranteed. Instead, a community of curators is liable to notice after the fact that there are many outstanding, well regarded, competing duplicates of fundamentally the same question, and work to choose a winner. Or they might have to start from scratch.

Implications

Anyone who has written a high-quality answer to something that was closed as a duplicate to what clearly appears to be set up as "canonical", should typically migrate their answer there, if it would not substantially duplicate an existing answer. It may also be worthwhile to comment on such answers to point out the situation, if the author is still active. Content from such answers might also be used, with appropriate attribution, to improve existing answers on the canonical.

A list like this should absolutely not be used to point out questions that curators think are actual duplicates. The saying is "all roads lead to Rome" for a reason, even though physical roads can be traveled in both directions. We have instantaneous, one-way teleporters; why on Earth would we do extra work to install them the wrong way around?

The duplicate relationship, when everyone is doing their job properly, is transitive, so links should be fixed to go directly to the canonical.

On the other hand, adding related links is adding value by pointing out relationships identified by subject matter experts, and clarifying the scope of individual questions. We cannot rely on the site's "Related" feature for this: it's not based on human insight and doesn't appear to give a damn about question quality. Similarly, "Linked" is a hodge-podge of actual duplicates mixed together with e.g. questions where someone mentioned the current question in passing in a comment - possibly in response to a help vampire.

This question in particular

Disclaimer: I stopped using C or C++ for any serious purpose right around the time C++11 was released; although I still consider myself competent with them, I am not properly familiar with many newer features, and my language-lawyerly knowledge may have faded.

Perusing the duplicate and "related" links that were contained in the answer, I found that most of them really are just duplicate. A big part of the problem is that this question needs editing for scope and clarity. While there seems to be strong consensus that it currently offers the best answers, it doesn't frame the question well. Although I generally dislike this kind of bullet-point list (even for intentional "FAQ" entries), I find that What is the proper declaration of main in C++? is a better framing of the question. (That is not a reason to make it the canonical instead!)

The issues I see with the phrasing are:

  • The title explicitly asks about the return type, but the parameters are clearly a much more interesting aspect of the question. I have to scroll very far before I see an answer that isn't discussing the entire signature of main. This happened in part because the question text asks about a "way to define" the function (but then gives example signatures rather than definitions), but mostly because the parameters and return type are two sides of the same coin and there is no good reason to ask about them separately. Especially since the relevant Standard text describes them both in the same place, by way of showing valid signatures.

    So, the question should be phrased and titled in that form. It would be okay for the title to include the word "return" somewhere, since that helps with search; but it should definitely include the other stuff, because that helps search (and curators!) even more.

  • "The correct (most efficient) way" makes little sense. Efficiency is of course a total canard here. There is more than one "correct" way, in the sense that the set of possibly-ever-valid signatures has more than one element. Instead, the question is really about:

    • What signatures are permissible according to the Standard?
    • What are the semantics of the return type and arguments?
    • What happens if an invalid signature is used?

    And all of that does make sense to include in the same question. Of course, answers need to make all appropriate distinctions between C and C++, and between versions of each.

Then there's the matter of what questions are related. Doing things my way, canonical versions of these questions would be identified and included in a short "See Also" section. I can extract the following potential, actually separate questions from what was linked:

  • What is the meaning of the names argc and argv? Are those exact names required? (It's useful to explain conventions; while the fact that they are conventional might naturally drop out of an explanation of what the Standard says about the signatures, it's still fundamentally a different issue - just as much as the conventional status of self in Python is.)

  • Can the auto keyword be used to infer the type of main? (While this seems to have been answered, where it was asked, with the same Standard citation, that citation isn't necessary to answer the main question; therefore that isn't an argument for it falling under the same scope.)

And one other question that, to me, naturally arises from discussion I saw in those questions:

  • May main recurse (or otherwise be explicitly called by the program logic)? If so, what are the implications for its signature?

You must log in to answer this question.

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