157

I just found this question and answer about why Java uses UTF-16, but now it is closed as primarily opinion-based.

I know, a similar issue is discussed here and some people say this type of question usually attracts opinion-based guesses as answers. But I think this case is a bit different, because this answer has official links as reference, and it doesn't require guessing or opinions.

Are questions about "why" on language specifications still opinion-based, even if they can have official references as answers?

8
  • 2
    Yes, because they still attract opinions, and there's no way to know if a question will ever get an official answer.
    – davidism
    Commented May 19, 2016 at 3:11
  • 8
    Somewhat duplicate of meta.stackoverflow.com/questions/260711/… - if official answer exists than keep, otherwise close... Unfortunately it is very hard to know which route is correct. Commented May 19, 2016 at 17:01
  • 3
    Unless they person or persons that made the decision are answering, then it is 100% speculation. If there is a quotable answer that can be 100% validated as true and accurate, you did not do your due diligence in researching and I would down vote and vote to close with deserved prejudice as well because it will just draw peoples opinions on whether the decision was correct or not.
    – user177800
    Commented May 20, 2016 at 22:40
  • 6
    @JarrodRoberson If the test for closing questions is "a provably correct answer already exists... somewhere", then there are precious few valid questions on this site. Commented May 22, 2016 at 3:55
  • @KevinJ.Chase - pretty much been saying that for 3 - 4 years now. 99.99999999% of everything posted has already been asked and answered at this point.
    – user177800
    Commented May 22, 2016 at 14:40
  • I've answered a question by referencing thirty-year-old Sun documentation. Now, any sentence in the vendor's documentation may be wrong and some are, but still it's harsh to say that such an answer is 100% speculation.
    – arnt
    Commented Nov 30, 2018 at 9:33
  • The problem w/ these is sometimes there is no pleasant answer: all answers with a nice explanation are 100% wrong, the correct answer is "just because it was made that way", that answer is considered "not an answer" and is deleted.
    – curiousguy
    Commented Oct 29, 2019 at 0:25

5 Answers 5

248

Is asking “why” on language specs still considered as “primary opinion-based” if it can have official answers?

Long-time readers of my blog or my answers on SO know that this whole area is a peeve of mine.

The fundamental problem with the "why" question is not that the answer is an opinion. The fundamental problem is that it is impossible to know what will satisfy the person asking the question because the question is vague.

The question is often phrased "why does program X produce behaviour Y?" The answer given is often "because section Z of the specification says that's the right behaviour". Does that answer satisfy the original poster? It seems unsatisfying; it seems like it answers a "why" question with "just because". It seems like the natural next question to ask is "but why does the spec say that?" Because that's what the spec authors wrote. Well why did they write that? Because that's what they thought the best way to define the language was. Why did they think that?

Well, I've been in many, many hundreds of hours of those meetings and let me tell you, the reason why they thought that is because there were ten people in a room, half of them had strong opinions, and there was a back-and-forth argument about it for months on end before a reasonable compromise was struck that left everybody pretty happy. And then the design was shown to some senior architects, or put up for discussion on GitHub, or whatever, and the whole thing was torn apart again and put back together in a slightly different form.

There is no "clean" answer to the question about why the particular sausage was made that way. Design is complex, is iterative, and always is the result of carefully chosen compromises between many competing and incompatible goals.

But maybe the original poster was just interested in where in the spec the justification for the behaviour was. In which case all this philosophizing is just a waste of time. The question is vague; let's push back on these questions and make them more crisp.

Even worse though is "why does program X NOT have behaviour Y?" or "why does language L not have feature F?" Now we're asking for a reason why something does not exist; it is hard enough to justify why something does exist. Justifying why the world isn't the way you think it should be is pretty much impossible. It's like making small talk at parties by starting with "so, why don't you sail?" How is a non-sailor supposed to even begin to answer that question? See Is it subjective to ask about why something wasn't implemented in the language? for more thoughts on that.

My preference is that "why" questions be rephrased into "what" questions that have answers.

  • "What section of the specification describes this behaviour?" is a question that has an answer that certainly has a reference.

  • "What are the C# language design team's opinions on the proper use of iterator blocks?" is a question that has an answer, and that might have citable reference materials, or at least has actual people around that you can ask.

  • "What are some reasons why a language designer might push back on this proposed feature?" is a question that has an answer; it's not a question that has a lot of written reference materials, and it is verging towards opinion based, but it's a question I've answered a lot. The question at least makes it clear that we are looking for design considerations, and not a spec reference, and that's something.

16
  • 21
    Science basically does the same: replaces "why" questions with "how (things work)" questions. Then an answer to "why" becomes "because the world works like this and this". Commented May 19, 2016 at 17:25
  • 1
    I think it depends on the context, but if you are repeatedly running into cases where the major players involved can't answer the simple question of why large swaths of the program work the way they do, your design methodology needs a total overhaul.
    – user3995702
    Commented May 19, 2016 at 19:35
  • 8
    @WilliamKappler: Well, sure, I take your point. You want a language to be principled in its design. My point though is that the "why" question in its most general form could come down to a question about how a disagreement about language goal prioritization was resolved, and knowing that particular historical detail doesn't solve anyone's pragmatic coding problem. By making the question more crisp we can more easily figure out what the questioner really needs to get their work done. Commented May 19, 2016 at 19:48
  • 8
    Projects with a BDFL tend to avoid the type of problem discussed in this answer. Questions about decisions in these projects can often be answered directly (e.g., "why doesn't Python have TCO?" can be answered by a link to the project leader's blog post about that subject). Commented May 19, 2016 at 20:45
  • 11
    @TigerhawkT3: Well, mileage may vary. C# has a BDFL in Anders; benevolence includes openness to lengthy discussions of the various merits, and willingness to change one's mind in the face of persuasive evidence. Several examples immediately come to mind of situations where the "why not?" was "because Anders doesn't like this feature", and that decision was later reversed as new data became available. It would be terribly incomplete to then say that the feature exists "because Anders likes it now". Commented May 19, 2016 at 20:54
  • 9
    @TigerhawkT3: I'll also note that in the particular case of C#, the blog in question is usually mine, not the BDFLs! :) Commented May 19, 2016 at 20:55
  • 2
    I guess I'm spoiled by Python's PEPs (basically, the official documentation for Python's design decisions). Commented May 19, 2016 at 20:57
  • 2
    @TigerhawkT3: Indeed. Moving the C# design team notes and process to GitHub I think is a major step in the right direction towards making this whole business more understandable to the community. Commented May 19, 2016 at 21:00
  • Hey, at least the small talk isn't "so, why don't you lift?" ;)
    – BoltClock Mod
    Commented May 20, 2016 at 3:47
  • 5
    I wonder if there's a better way to express "What section of the specification describes this behaviour?" without running a risk of getting closed for "asking us to recommend or find a book, tool, software library, tutorial or other off-site resource" - many people consider documentation an off-site resource and close questions for this reason.
    – BoltClock Mod
    Commented May 20, 2016 at 3:52
  • 1
    Here's a why question, that you sir answered me years ago, and I think both the question and the answers are good and valuable. So not all why questions are bad IMHO.
    – gdoron
    Commented May 20, 2016 at 6:12
  • 4
    I love this answer, but I do have a critique. I never would have realized that my language on SO questions had to be so precise. This is especially true when I think that so many questions are asked by non-native english speakers. Language is imprecise (spoken languages, anyway) so because the person is writing a SO post instead of a philosophy paper (or legal documents, or anything where precise language is paramount) it's hard for me to justify expecting people to understand excellent posts like this before asking a question. My conscience is torn. Commented Jun 17, 2016 at 21:04
  • 5
    "The fundamental problem is that it is impossible to know what will satisfy the person asking the question because the question is vague.". So, because we cannot be 100%, then lets take away to possibilty from anyone to even try? Why is it a good thing? Why is a "why" question inherently vague?
    – geza
    Commented Jul 6, 2017 at 8:51
  • 5
    "Does that answer satisfy the original poster? It seems unsatisfying;" Actually, it is an answer to the question. Even, if it seems unstatisfying, it is an answer, or maybe the answer. And for future readers, too.
    – geza
    Commented Jul 6, 2017 at 8:53
  • 2
    I agree that "Why?" should be replaced with "What?" Imho, a great way to make an otherwise "opinion based" question factual, is to change the "Why?" or "Which one?" to ... "What are the pros and cons?", or "What are the consequences of ...?" Commented Mar 5, 2021 at 16:34
42

It depends on what the asker means by "why".

If a question is asking why a piece of code is behaving a certain way, or why a certain construct is legal (or not), and the reason can be found in the language specification or some equivalent documentation, there is nothing wrong with asking and answering such a question. It's really not all that different from using documentation to support an answer to a coding question, except in this case the question isn't seeking code, it's seeking understanding on how the code works and why it works that way. But, ultimately, the question still is about the code, and unless you aspire to be a subject of mockery by others for blindly writing — or worse, copying and pasting — code without any clue as to what you're actually doing, you'll often have such questions about your code or anyone else's code, and that's OK. If nothing else, it's a sign that you're a decent programmer.

If a question is asking why the author(s) or developer(s) of the specification made things a certain way, such a question can only be answered authoritatively by the people themselves unless their design decisions were documented in a reputable source (and nobody knows this for sure unless said sources are readily available to the public, which is rarely the case). The problem with this type of question is that it's not about the code, or the documentation, it's about why the documentation was written that way. A human's rationale for making things a certain way. And this is precisely what an opinion is — except in this case it's an opinion that happens to have influenced the design of a language or feature. And such things often aren't documented, and even if they are, they're often just trivia and not of any practical use.

That's where things get messy, and why it's one of the categories of questions served by the "primarily opinion-based" close reason. Because everyone can share their opinion on why they think a certain decision could have been made — and, for some reason, a lot of people do. I know I have been guilty of the same from time to time.

16
  • 11
    But isn't there a difference between asking "What's your opinion on …?" and asking "What was the language author's opinion on … that led to feature XY?"?
    – Bergi
    Commented May 19, 2016 at 12:14
  • 8
    @Bergi: There is. If only we could discourage people other than the language author from answering somehow. (Downvoting maybe?)
    – BoltClock Mod
    Commented May 19, 2016 at 12:20
  • 7
    The author in question may have published his/her opinion elsewhere, blogs, twitter, mailing lists etc. Guido van Rossum (of Python) is well known for that.
    – RoadieRich
    Commented May 19, 2016 at 17:00
  • @RoadieRich: That too.
    – BoltClock Mod
    Commented May 19, 2016 at 17:44
  • 11
    Standards often including motivating factors and rationale. Or there are conference presentations or published papers on the subject. From any one of those sources I'd consider the answer authoritative or an objective. Java designers are very good about explaining rationale (Josh Bloch has a good discussion somewhere why BGGA was not a good fit to Java). In these cases I feel the question is on-topic. If it's something like "why did Caml designers make it functional?" then I'd say it's not since it is then broad and opiniony.
    – Sled
    Commented May 19, 2016 at 20:06
  • 2
    The Go team writes a ton, and a lot of team discussion is public, like code reviews, mailing lists, style docs, etc. So you can often cite stuff they said about matters of opinion, as folks are saying re: Java and Python. I tend to err towards including their takes in answers even when the ? isn't unambiguously asking for that; it's a step past the everyone-has-a-preference kind of thing, and often feels like useful/instructive perspective.
    – twotwotwo
    Commented May 19, 2016 at 21:02
  • "Because everyone can share their opinion on why they think a certain decision could have been made" I happen to know the "why" of a few design decisions. It was just because. Made that way. No reason. I can't post that answer because it's "not a real answer" whatever that means.
    – curiousguy
    Commented Oct 29, 2019 at 0:26
  • @curiousguy: I understand. I also know of a few design decisions that just were. In my experience it's really difficult to provide a convincing uncited answer without sounding like I'm just pulling it out of my hat. It gets much easier if I can just point to a source that says "this is just how it was", but that's not always possible, since decisions made this way generally don't get documented (since not much discussion would've been had in the first place).
    – BoltClock Mod
    Commented Oct 29, 2019 at 2:50
  • @BoltClock Even if I wished to publish my name (I don't), I wouldn't be able to prove I was present during any one WG discussion nor that my memory is reliable.
    – curiousguy
    Commented Oct 29, 2019 at 2:55
  • @curiousguy: Well from what I've seen most readers are willing to take your word for it if you were involved in the decision-making process. Alternatively, you can ask another WG member with a presence on the site to verify your answer with a comment.
    – BoltClock Mod
    Commented Oct 29, 2019 at 3:01
  • @BoltClock That's when my questions, answers, and comments don't get deleted.
    – curiousguy
    Commented Oct 29, 2019 at 3:12
  • @curiousguy: Yeah, so these answers aren't disallowed per se, but in the interest of discouraging people not in the know from just guessing, it does unfortunately take more work to get them approved.
    – BoltClock Mod
    Commented Oct 29, 2019 at 3:22
  • 3
    Re "If a question is asking why the author(s) or developer(s) of the specification made things a certain way, such a question can only be answered authoritatively by the people themselves": FWIW, the language architects of Java regularly answer "Why?..." questions about Java language decisions on SO. For example: Why can't the var keyword in Java be assigned a lambda expression? by Brian Goetz, and Why is the finalize() method deprecated in Java 9? by Stuart Marks. But there are many, many more.
    – skomisa
    Commented Feb 24, 2022 at 4:04
  • @skomisa: Yeah, as well as Eric Lippert as he describes here of his personal experiences.
    – BoltClock
    Commented Feb 24, 2022 at 5:45
  • 1
    A language-spec related question can have an official answer that can be either language-authors' opinion based and arbitrary, or backed up by valid, noteworthy, useful and interesting reasons (provided by the authors themselves). The knowledge gained by the asker in getting to know such an answer is similar to the knowledge gained by other question-answers on SO, & I strongly recommend to allow such questions. Even if such an answer is just based on language-authors' opinion, knowing that will help developers in making informed decisions when coding just the way other answers on SO do.
    – manisar
    Commented Jun 22, 2023 at 21:53
16

A lot of times it's possible to turn up a good answer that goes a little bit deeper than the spec to some (documented, or well-known in the literature) rationale behind it. Sometimes the answer is great, sometimes the asker is glad to get it, and everyone wins.

And sometimes they're not satisfied and go one "why?" further, and we just want to say "shut up and eat your french fries." Sometimes it's hard to tell in advance whether there's somebody available to provide a really good answer, or whether the asker will be satisfied, but I don't like the idea of foreclosing the possibility completely when we've gotten some really enlightening Q&A out of them in the past, so I usually don't participate in voting to close this kind of question unless things look very vague/problematic from the get go. I wouldn't have voted to close this particular question, as it's fairly lucid and prompted a valuable answer (and, yes, a little squabbling as well, but that's less important).

2
  • Is there an official SO policy that "shut up and eat" is a 100% valid and allowed answer?
    – curiousguy
    Commented Oct 29, 2019 at 0:27
  • 1
    The posted link is dead. Here's an alive one.
    – MC Emperor
    Commented Feb 24, 2022 at 12:18
5

Even if there's an official reason, people will still want to inject their own opinions. I mean, consider movies. There's a writer and director for movies, but people still have their own opinions, even if those people comment on why they did certain things. The same can be said for these types of questions.

The real nail in the coffin here is that you don't necessarily have to understand the "why" to continue coding, which is the heart of off-topic questions. As your linked Meta question noted, a narrowly tailored question can sometimes get to the root without allowing for opinion.

6
  • 5
    This can be easily fixed by improving the question though. Ask for official sources or quotes from the relevant standard or rationale.
    – Lundin
    Commented May 19, 2016 at 11:49
  • 20
    I somewhat disagree with the last paragraph. As someone who programs OpenGL, it is very important to know why, for example, immediate mode was removed from the standard. You can simply hand wave it as the decision of a shadowy cosmopolitan council (the ARB), but doing so means you do not understand the fundamentals of how the system actually works, why immediate mode was a bad idea, or why the newer processes are better. You don't have to understand why is the start of cargo-cult programming.
    – user3995702
    Commented May 19, 2016 at 19:42
  • @WilliamKappler Immediate mode is nice for learning the basics of graphics programming, though.
    – JAB
    Commented May 19, 2016 at 20:02
  • 1
    Seems if following this answer, stackoverflow.com/questions/11227809 would also be off-topic:)
    – Gstestso
    Commented May 20, 2016 at 8:55
  • 4
    The why is useful not only for future language designers, but also for language users: understanding the design of a tool helps using the tool. You often can use a tool better if you use it in the natural intended way. But the issue is the amount of after the fact guesswork involved in such debates, when the designers did not write "The Design and Evolution of C++".
    – curiousguy
    Commented Oct 30, 2019 at 22:21
  • 6
    I just hate the philosophy that SO is only about things you need to know to continue coding. I love questions from people who don't just want to get past the current bug, but want to understand the technology more deeply so they can become better programmers. Just because the question probes deeply and therefore attracts answers from people who don't realise how little they know doesn't make it a bad question. Commented Jul 19, 2021 at 18:03
-23

I know, a similar issue is discussed here and some people say this type of question usually attracts opinion-based guesses as answers.

All questions attract "opinions", as most answers are not mechanically testable: saying that a program is correct is not, in general, verifiable.

But the specific issue with these why questions is that the high reputation users of that site do not want to see these "zero answers":

  • "it's just the rule"
  • "it was made that way period"
  • "no particular reason"

And they suppress these answers, even when they are correct.

4
  • 6
    "saying that a program is correct is not, in general, verifiable" - don't go P=NP or Halting Problem on me, but for a lot of questions in the form of "given input X, I want output Y", this is easily solvable and verifyable. Whether the answers given are the most optimal, in terms of efficiency, readability, ... is up for debate.
    – CodeCaster
    Commented Oct 29, 2019 at 11:11
  • @CodeCaster No, I mean that formally proving any specific program does not seem doable.
    – curiousguy
    Commented Oct 29, 2019 at 17:22
  • 3
    What does exactly "proving a program" mean?
    – jarmanso7
    Commented Nov 3, 2022 at 13:54
  • @jarmanso7 I assert that you cannot prove anything about any program that has C/C++ MT semantics, because those semantics are trash. Most C and C++ so called "semantics" are a very crude attempt at defining a programming language, and attempt that failed abjectly. Which is why scientists tend to look down on C and C++. Questions about program correctness are essentially ill founded when PL are so badly defined. Like a Q of law, it depends on the time and space: which court (or compiler maker) you ask, and the current psychology of the crowds that buy compilers.
    – curiousguy
    Commented Nov 17, 2022 at 21:12

You must log in to answer this question.

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