As of today, the [pros-cons] tag has officially been burninated, but we haven’t yet made any decisions about whether pros/cons questions are actually on topic. This has been discussed to some extent in the past, but there did not seem to be any real consensus. Currently, these questions comprise a substantial portion of our site, so ruling them off-topic would appear to be a rather radical move. If we extend our consideration to language design questions more broadly, it seems like it would be patently absurd to call something included in our site name out of scope! However, I would like to make the following case:
Open-ended language design questions attract poor answers.
When people ask questions like “what is the best approach” or “what are the pros and cons of this feature,” it is difficult to evaluate whether answers are even correct. It is not hard to find arguments over typing discipline on the internet, and many claims are easily tossed around, but these claims infamously fail to replicate when studied. Voting degrades to a popularity contest.
Uncritically allowing these questions provides the wrong signal.
Our preponderance of poorly-scoped language design questions provides the impression that language design is largely a matter of personal experience and learned wisdom. However, this is simply not true. Programming language design and implementation is a discipline of expertise that can be learned. We should encourage participation of hobbyists and learners, but we should be exceedingly cautious about amplifying genuinely incorrect information.
Our best language design questions can easily be reframed to be more focused and more useful.
I am not proposing a mass removal of what currently makes up the majority of our site content; quite the opposite. I am suggesting that we identify what’s already working well, make it more explicit, and codify it, and I think doing this will improve our existing questions and answers.
A guiding principle here that I would like to make overwhelmingly clear is that we should always strive to preserve good content. Any policy that would make the good content we currently have off-topic is not a good policy. Therefore, I want to make the case that we can narrow our scope in a way that benefits everyone, without losing what we have along the way.
The dangers of a lack of focus
Discussions of programming languages on the internet are infamously caustic. Programmers have a dizzying number of opinions about what makes programming languages good or bad, regardless of their programming languages expertise. Debates usually cover topics such as “readability”, “expressiveness”, “safety”, “efficiency”, “simplicity”, and “scalability”, but these terms are rarely defined. We have already attracted some answers that make arguments of this flavor. Here are a few examples:
This answer makes the case that chained comparison operators are “difficult to understand, especially if you are reading someone else’s code.” However, a commenter on the answer says “I would argue the opposite. […] For me it’s pretty obvious what it means.” Who is right? Most likely both of them, as they aren’t actually in contradiction if we restrict their statements to their subjective experiences.
This question attracted a staggering number of lengthy comment discussions, two of which had to be moved to chat by a moderator. And for what? The question itself could be a perfectly well-scoped, objective question—what do you lose if you restrict the scope of C-style UB?—but the presence of “pros and cons” in the title serves only to make it sound as if there is some debate to be had.
This answer is essentially a just-so story. It sounds plausible enough, and it is very highly voted, but there is really no evidence whatsoever that it is true. If the question were refocused as a history question, these kinds of answers would be subject to significantly more scrutiny, and I think that would be a good thing.
This answer is, frankly, just plain wrong. But it currently sits at +12, and it is accepted. Why? One problem is perhaps a lack of experts who could discern that the answer is incorrect. But another is that we do not have a culture of expecting answers to be well-supported (by either references or personal experience), so we are unable to distinguish answers that sound right from ones that actually are.
Allowing highly-voted yet incorrect content to proliferate on our site is extremely dangerous. It gives the impression that we are simply not very serious about what we are doing, and it makes us unlikely to attract and retain genuine subject-matter experts. This is a real problem in the history of online programming languages communities: so many programmers have such strong (yet ultimately ill-informed) opinions that it becomes too tiresome to argue, and experts retreat to more closed spaces that they can more effectively moderate.
In an ideal world, we would simply have so many experts that incorrect content would be reliably downvoted, but this is difficult to achieve in practice for many reasons. What we can do instead is create policies that make it easier to discern good content from poor content, and that allow non-experts to be more informed voters.
Turning unfocused questions into focused ones
I’d like to now take a look at a few case studies of how I think we can preserve good content by narrowing questions’ scope. I want to make the case that this can actually improve these questions in the process, making our good content even better.
Case 1: Introducing [history] and literature survey questions
As a case study, let’s consider Why do most languages use the same token for `EndIf`, `EndWhile`, `EndFunction` and `EndStructure`?, which is currently quite open-ended. Several of its answers are unsupported post-hoc rationalizations: maybe they’re true, maybe they’re not, we can’t know. However, it also has a number of very good answers that go into some of the history of the subject under discussion, and I think this is an ideal way to make this question more objective.
I therefore propose introducing a history tag and making this question a history question. I also propose making more general “literature survey”-type question on-topic: questions that are not about history per se, but are still a request for real, existing examples, whether of language projects or discussions in blogs, forums, or academic literature. We could focus numerous other questions in one of these ways:
- Why add an increment/decrement operator when compound assignments exist?
- Why don't many languages have integer range types?
- What are the pros and cons of goto?
- What obstacles prevented C and C++ from standardizing π?
- What strategies did Go use to circumvent the lack of generics?
- What are the common reasons to create a new programming language?
- Why would a language have different error handling for libraries and applications?
- How can a block-based language represent type-compatibility of blocks?
- Why does Rust have an infinite loop construct?
- Ternary operators other than ?:
I could list many, many more, but I suspect this is sufficient to make my point. The idea here is that we don’t want people to propose their own personal theories—unless, of course, they are a primary source! But we do still want to gather a number of different perspectives, and a look into the history or literature is a fantastic way to do that.
Case 2: Introducing human–computer interaction questions
Next, let’s consider What are the downsides of supporting chained comparison operators? This question sounds incredibly subjective at first glance, but it actually attracted a remarkably good answer. The key thing that, to me, makes this answer so great is that it is based on more than just personal experience—it puts some actual numbers to the topic being discussed:
The reason I say Python got this wrong is that empirically, a lot of people are confused about it. Chained comparisons are one of the most recurring Python questions on Stack Overflow; currently, the canonical question has 145 upvotes and 52 duplicates.
This is an amazingly good way to answer a question like this, and it sets a gold standard that we should all strive for when it comes to answering questions about language usability. It also hints that there really are alternatives to answering language design questions based purely on vibes—there are real, systematic approaches that can do much better.
Indeed, the field of human–computer interaction (HCI) is all about understanding the complex, fuzzy space that arises between humans and machines. HCI has disciplined strategies and approaches to analyzing what it means for something to be “more usable”, and this lens can help to add rigor to questions that are fundamentally about human factors. Here’s a list of question that I think could be improved using this framing:
- What are the pros and cons of static typing?
- What are the upsides of using explicit line-ending characters (like semicolons) as opposed to newlines?
- What are advantages and disadvantages of C-style for loops?
- Pros and cons of semantically-significant capitalization
- Is colorForth's unique syntactic approach helpful to the programmer?
- What are the pros and cons of allowing keywords to be abbreviated?
- What should be included in error messages?
- Are very explanatory compiler error messages worth the effort needed to implement them?
It’s worth noting that, although rigorous studies and hard empirical evidence are obviously the gold standard for answering these sorts of questions, it would be unreasonable to expect it for all answers. The amount of empirical research that has been done on programming language usability is minimal, and it is infamously challenging to control for the relevant confounding factors. However, even if rigorous studies are not available, we can expect appeals to case studies, external evidence, existing discussions, and expert opinions, and I believe we should. Moreover, several of the questions I linked do concern topics upon which studies have actually been conducted, and it would be amazing to get answers that cite them.
Essentially, we want to encourage answers that step outside the perspective of the answerer and try to provide a broader perspective. This can be informed by the answerer’s personal experiences, but it probably should not be wholly determined by them.
Case 3: Language design questions that are really implementation questions
Finally, I want to look at Pros and cons of "anything-can-happen" UB versus allowing particular deviations from sequential program execution. As mentioned above, I think this question can be significantly improved in a fairly simple, uninvasive way: edit them to make it clear that they are asking a technical question. This one currently asks
What advantages are there to the currently-popular approach of characterizing all executions as either fully specified or "anything can happen" UB?
but it could easily be tweaked to instead ask this:
What prevents C and C++ from constraining what can happen if a program invokes undefined behavior?
The question really doesn’t have to change much otherwise, but this immediately converts a subjective question to an objective one. The existing answers already focus on the objective question, anyway, so absolutely nothing is lost. This is just a net good, and I suspect the reason that these questions are currently phrased as pros/cons questions is simply that we currently have so many of them!
Here is a non-exhaustive list of questions that I think could be improved in this way:
- Why do some programming languages choose to have a dedicated keyword for elseif instead of using else + if like in C?
- Are there good reasons to minimize the number of keywords in a language?
- Why is it so hard to evaluate functions with constant arguments at compile-time?
- What are the advantages of requiring forward declaration of methods/fields like C/C++ does?
- What are the advantages and disadvantages of implementing reals as rationals?
- Is there any particular reason to only include 3 out of the 6 trigonometry functions?
- Why don't many languages have integer range types?
- What are the pitfalls of using an existing IR/compiler infrastructure like LLVM?
- What are the pros and cons of a compiler with a single-pass parser?
Again, I don’t expect this to be particularly disruptive, but the rephrasing would help to scope the question, and being able to phrase questions this way is a good exercise to demonstrate that the question is objectively answerable.
What to do with everything else
I believe that the above categories I have listed cover the vast majority of our existing language design content. I think virtually all of our old pros-cons questions that are worth preserving could be reclassified in this way. This paves the way for us to restrict our scope for questions that don’t fit into these categories, and I think we ought to take some inspiration from Software Engineering’s help center:
Some questions, even if they appear to fit into one of the above categories, may still be off-topic:
[…]
- Questions asking "What is the best way" without providing any criteria for evaluating what is best.
The linked question gives a slightly lengthier list of examples:
Questions of the following form are often closed as too broad:
- "Review My Design"
- "What is the Best Practice?"
- "Will my approach work? Is it viable?"
- "Is this the correct / preferred / accepted / most popular / better way?"
- "What could go wrong?"
- "Tell me the name of this thing so that I can Google it."
How can I avoid the problems associated with these kinds of questions so that my post isn't closed as Too Broad?
I think this is a pretty good starting point, though I would adapt it a little to better suit PLDI’s needs. In particular, I might suggest the following phrasing for the bullet in our help center:
Questions asking “what are the pros and cons of this language feature” without providing enough context for an impartial evaluation of the tradeoffs.
Obviously, I am happy to consider alternative wordings, or even alternative scopes! But this seems like a good place to start to me.
A passionate request for feedback
This question articulates my vision for what I believe PLDI can be and how I believe we can best move in that direction. I want to grow this community into a wonderful, respected resource for people interested in programming languages, and I believe doing that requires some earnest reflection on what we expect of our fellow community members to. However, this is only my vision, and what is most important is that we can find a set of values we can all agree upon. Therefore, I would like to hear any and all opinions that people may have about any aspect of this proposal.
Though we are small, we have already accrued an impressive number of exceptionally great questions and answers. I have a great deal of respect for everyone who has participated thus far, so please: chime in! If you think what I have proposed is against everything you stand for, tell me! Let’s find something we can all commit to upholding.