Regarding this question:
Where did the notion of “one return only” come from?
What should be done with it?
- Nothing
- Close
- Delete
- Wiki lock
- Something else
Regarding this question:
Where did the notion of “one return only” come from?
What should be done with it?
I see no reason to do anything about it.
I suggest a wiki lock.
This question and its top answer dig into historical details that may not be commonly known. Specifically, there is a programming mantra still around that has its roots in a type of programming that many modern programmers are not familiar with. The top answer provides very clear and useful information to explain the origins of this mantra and why it used to be a good idea but anymore is not necessary. This is specifically the type of resource one could link to for concrete evidence to prove one's point.
As the question is already a community wiki, a wiki lock's only effect would be to ensure the question is neither closed nor deleted. As I believe it has value to the community, but others have suggested closing or deleting it, I vote in favor of keeping this one around.
Sort of a later follow-up: question was further cleaned up and 14 answers that didn't attempt to address the question and/or were repeating prior ones were removed by moderator (one or two answers were deleted by their authors per discussion in comments).
The question looks generally good to me, it appears to be reasonably clear and focused and rather difficult to misinterpret.
Though some answerers managed to "leak through" minor slippery points in wording. Granted, some of them dumped their stuff in first several hours prior to revision 4, while text (and especially title) of the question were leaving bit more room for misinterpretation.
Prior editors did pretty good job of cleaning it up but there still seem to be some corrections worth considering, especially now that question apparently gained huge popularity and has got to our all time top 50 open questions with over 85K views.
I would particularly recommend the following changes:
Add history tag. After revision 4 main focus of the question has been very prominently shifted to this and lack of the respective tag looks really confusing. Not to mention that this makes it harder to search.
Note about ternary operator that "gets even less love among Java programmers etc". It probably fit well into trollish / ranty mood of the original text but in current form, it looks rather poor fit to the rest of the question. I would replace it with more neutral explanation, about like this:
But that's only because code snippet was made as simple as possible to clearer show the idea, the question is about more realistic cases where ternary operator is not an option.
Closing words "why do people adhere to it rigidly?" are worth removing. These are just a leftover of original rant and really have no place in the question. Actually, words like this are usually enough for me to vote close as opinion based / too broad but prior editors did a really good job of making it clear that it's tangential to the question (except for maybe the most rigidly careless answerers).
Cleaning up the question may be good, but we would better take care of tangential answers as well.
Even now, visitors probably find these confusing and wonder how these are related to the question. But very attentive readers can at least re-check the question text and say, "ah, this answer exploits <such and such minor point of the question>, I understand".
But if the question is cleaned as suggested above, these answers will become really harmful, telling tens thousands visitors, "hey, it's okay to totally ignore what is asked about and just drop into answer box whatever comes to your mind".
I suggest closing.
The question is unlikely to be deleted, and impossible for the roomba to delete. This would serve as one less question for users to use as an example of an off topic but still open question.
I agree that there is value in this question - but it is rather large and has many, many answers, some of which are in need of pruning off. A close would serve to preserve it as it sits today, while preventing people from piling additional answers onto the already thoroughly explained question.