Skip to main content
Typo
Source Link
CPlus
  • 4.5k
  • 1
  • 27
  • 50

I occasionally see questions about mistakes caused by incorrectly assuming that (x == a || b || c) means (x == a || x == b || x == c) but cannot find an appropriate canonical for the language the question is in.

Some canonical questions exist but only for specific languages:

Why is there a language-agnostic canonical for a very similar issue but not for this one? What should I do if I find a question that is caused by that mistake but no language-specific canonical exists?

I occasionally see questions about mistakes caused by incorrectly assuming that (x == a || b || c) means (x == a || x == b || x == c) but cannot find an appropriate canonical for the language the question is in.

Some canonical questions exist but only for specific languages:

Why is there a language-agnostic canonical for a very similar issue but not for this one? What should I do find a question that is caused by that mistake but no language-specific canonical exists?

I occasionally see questions about mistakes caused by incorrectly assuming that (x == a || b || c) means (x == a || x == b || x == c) but cannot find an appropriate canonical for the language the question is in.

Some canonical questions exist but only for specific languages:

Why is there a language-agnostic canonical for a very similar issue but not for this one? What should I do if I find a question that is caused by that mistake but no language-specific canonical exists?

Simplified the question
Source Link
CPlus
  • 4.5k
  • 1
  • 27
  • 50

I occasionally see questions about this common mistake but cannot find an appropriate canonical for the language the question is in.

I have seen: Canonical, language-agnostic question for if(var != "x" || var != "y" ...)

That question asks a canonical for questions about themistakes caused by incorrectly assuming that if (x !=== a || x != b ...|| c) and resulted in one being created: Why does non-equality check of one variable against many values always return true?

The question also mentions a similarmeans if (x == a || x == b || cx ...== c) problem,but cannot find an appropriate canonical for which severalthe language the question is in.

Some canonical questions exist, but only for specific languages:

What should be done about miscellaneous questions caused by the if (x == a || b || c ...) problem for languages that do not haveWhy is there a language-agnostic canonical? Here are some ideas that come to mind for a very similar issue but might not be good ideas for various reasons:

  • Should a new language-agnostic canonical be created for those? This would require a lot of effort and might not be necessary.
  • Should a new language-specific canonical Q&A be created for each and every new language I see about this problem? Some less widespread languages might not encounter this problem often enough to warrant a new canonical Q&A for each one and there will be a lot of redundant information.
  • Should they be closed as a duplicate of Why does non-equality check of one variable against many values always return true? Though the underlying cause of the problem is different and the other question might need to be modified to include if (x == a || b || c ...) cases.
  • Should they be closed as a duplicate of a canonical of a different language? This would be confusing as the users directed to them would see solutions not relevant to their use case.
  • Should they be closed as Not reproducible or caused by a typo? This would not direct the author to an appropriate resource to learn more about the problem unless someone leaves a comment.

Ifthis one? What should I am correctdo find a question that these ideas are not the best what should be done insteadis caused by that mistake but no language-specific canonical exists?

I occasionally see questions about this common mistake but cannot find an appropriate canonical for the language the question is in.

I have seen: Canonical, language-agnostic question for if(var != "x" || var != "y" ...)

That question asks a canonical for questions about the if (x != a || x != b ...) and resulted in one being created: Why does non-equality check of one variable against many values always return true?

The question also mentions a similar if (x == a || b || c ...) problem, for which several canonical questions exist, but only for specific languages:

What should be done about miscellaneous questions caused by the if (x == a || b || c ...) problem for languages that do not have a canonical? Here are some ideas that come to mind but might not be good ideas for various reasons:

  • Should a new language-agnostic canonical be created for those? This would require a lot of effort and might not be necessary.
  • Should a new language-specific canonical Q&A be created for each and every new language I see about this problem? Some less widespread languages might not encounter this problem often enough to warrant a new canonical Q&A for each one and there will be a lot of redundant information.
  • Should they be closed as a duplicate of Why does non-equality check of one variable against many values always return true? Though the underlying cause of the problem is different and the other question might need to be modified to include if (x == a || b || c ...) cases.
  • Should they be closed as a duplicate of a canonical of a different language? This would be confusing as the users directed to them would see solutions not relevant to their use case.
  • Should they be closed as Not reproducible or caused by a typo? This would not direct the author to an appropriate resource to learn more about the problem unless someone leaves a comment.

If I am correct that these ideas are not the best what should be done instead?

I occasionally see questions about mistakes caused by incorrectly assuming that (x == a || b || c) means (x == a || x == b || x == c) but cannot find an appropriate canonical for the language the question is in.

Some canonical questions exist but only for specific languages:

Why is there a language-agnostic canonical for a very similar issue but not for this one? What should I do find a question that is caused by that mistake but no language-specific canonical exists?

added 74 characters in body; added 5 characters in body
Source Link
CPlus
  • 4.5k
  • 1
  • 27
  • 50

I occasionally see questions about this common mistake but cannot find an appropriate canonical for the language the question is in.

I have seen: Canonical, language-agnostic question for if(var != "x" || var != "y" ...)

That question asks a canonical for questions about the if (x != a || x != b ...) and resulted in one being created: Why does non-equality check of one variable against many values always return true?

The question also mentions a similar if (x == a || b || c ...) problem, for which several canonical questions exist, but only for specific languages:

What should be done about miscellaneous questions caused by the if (x == a || b || c ...) problem for languages that do not have a canonical? Here are some ideas that come to mind but might not be good ideas for various reasons:

  • Should a new language-agnostic canonical be created for those? This would require a lot of effort and might not be necessary.
  • Should a new language-specific canonical Q&A be created for each and every new language I see about this problem? Some less widespread languages might not encounter this problem often enough to warrant a new canonical Q&A for each one and there will be a lot of redundant information.
  • Should they be closed as a duplicate of Why does non-equality check of one variable against many values always return true? Though the underlying cause of the problem is different and the other question might need to be modified to include if (x == a || b || c ...) cases.
  • Should they be closed as a duplicate of a canonical of a different language? This would be confusing as the users directed to them would see solutions not relevant to their use case.
  • Should they be closed as Not reproducible or caused by a typo? This would not direct the author to an appropriate resource to learn more about the problem unless someone usesleaves a comment.

If I am correct that these ideas are not the best what should be done instead?

I occasionally see questions about this common mistake but cannot find an appropriate canonical for the language the question is in.

I have seen: Canonical, language-agnostic question for if(var != "x" || var != "y" ...)

That question asks a canonical for questions about the if (x != a || x != b ...) and resulted in one being created: Why does non-equality check of one variable against many values always return true?

The question also mentions a similar if (x == a || b || c ...) problem, for which several canonical questions exist, but only for specific languages:

What should be done about miscellaneous questions caused by the if (x == a || b || c ...) problem for languages that do not have a canonical? Here are some ideas that come to mind but might not be good ideas for various reasons:

  • Should a new language-agnostic canonical be created for those? This would require a lot of effort and might not be necessary.
  • Should they be closed as a duplicate of Why does non-equality check of one variable against many values always return true? Though the underlying cause of the problem is different and the other question might need to be modified to include if (x == a || b || c ...) cases.
  • Should they be closed as a duplicate of a canonical of a different language? This would be confusing as the users directed to them would see solutions not relevant to their use case.
  • Should they be closed as Not reproducible or caused by a typo? This would not direct the author to an appropriate resource to learn more about the problem unless someone uses a comment.

If I am correct that these ideas are not the best what should be done instead?

I occasionally see questions about this common mistake but cannot find an appropriate canonical for the language the question is in.

I have seen: Canonical, language-agnostic question for if(var != "x" || var != "y" ...)

That question asks a canonical for questions about the if (x != a || x != b ...) and resulted in one being created: Why does non-equality check of one variable against many values always return true?

The question also mentions a similar if (x == a || b || c ...) problem, for which several canonical questions exist, but only for specific languages:

What should be done about miscellaneous questions caused by the if (x == a || b || c ...) problem for languages that do not have a canonical? Here are some ideas that come to mind but might not be good ideas for various reasons:

  • Should a new language-agnostic canonical be created for those? This would require a lot of effort and might not be necessary.
  • Should a new language-specific canonical Q&A be created for each and every new language I see about this problem? Some less widespread languages might not encounter this problem often enough to warrant a new canonical Q&A for each one and there will be a lot of redundant information.
  • Should they be closed as a duplicate of Why does non-equality check of one variable against many values always return true? Though the underlying cause of the problem is different and the other question might need to be modified to include if (x == a || b || c ...) cases.
  • Should they be closed as a duplicate of a canonical of a different language? This would be confusing as the users directed to them would see solutions not relevant to their use case.
  • Should they be closed as Not reproducible or caused by a typo? This would not direct the author to an appropriate resource to learn more about the problem unless someone leaves a comment.

If I am correct that these ideas are not the best what should be done instead?

added 74 characters in body; added 5 characters in body
Source Link
CPlus
  • 4.5k
  • 1
  • 27
  • 50
Loading
Provided explanations why I am in no way 'endorsing' these solutions, just using them as examples
Source Link
CPlus
  • 4.5k
  • 1
  • 27
  • 50
Loading
added 135 characters in body
Source Link
CPlus
  • 4.5k
  • 1
  • 27
  • 50
Loading
Made the question less of a yes/no question and more open-ended
Source Link
CPlus
  • 4.5k
  • 1
  • 27
  • 50
Loading
Made the question less of a yes/no question and more open-ended
Source Link
CPlus
  • 4.5k
  • 1
  • 27
  • 50
Loading
Source Link
CPlus
  • 4.5k
  • 1
  • 27
  • 50
Loading