4

Is there good place for questions like "why in language XXX feature YYYY was designed in particular way (maybe 10-20 years ago)" or similar questions on historical design decisions.

My feeling is that such questions have low practical value and thus don't belong to SO.

Case that prompted the question: Why does C# have a separate rethrow statement (throw;) instead of overloading throw ex?. I closed it is as duplicate of discussion on the feature in question, but probably it should be handled differently.

What is recommended reason to close or if it even should be closed at all? Would such question be more appropriate for http://programmers.stackexchange.com ?

6
  • 2
    The case you are citing isn't a "why in language XXX feature YYYY was designed in particular way" question. It seems that the OP is merely confused about the language feature. Jun 16, 2014 at 20:05
  • @RobertHarvey I am not confused Jun 16, 2014 at 20:06
  • 2
    @bosonix: Then what are you asking exactly? throw preserves the stack trace from the original exception. throw ex creates a new one. That's it. Use whichever one is appropriate for the situation. Jun 16, 2014 at 20:06
  • @RobertHarvey I'm asking how this helps, when the Java design is simpler: throw ex always preserves stack trace in Java, and if you don't want this you can create a new exception, e.g. throw new Exception(ex.Message);; this approach seems more natural to me, so I do not understand which is the advantage of the C# design. Jun 16, 2014 at 20:09
  • 3
    @RobertHarvey I believe what he's asking is why "throw ex" exists. But it's a little bit confusing because he's also suggesting that throw should be changed to throw ex, and not explaining that very clearly Jun 16, 2014 at 20:22
  • c# has the same design or a least almost, as exceptipn is a class you can overwrite ir
    – nbk
    Nov 1, 2021 at 11:19

1 Answer 1

22

I don't see why the standards for these types of questions should be any different than for other types of questions. If they're well-asked and reasonably answerable, then they're perfectly acceptable. If not, well, you know…

Don't focus too much on the "practical" aspect of the site's guidelines. That quickly turns into a slippery slope to having a site full of "debug my code" questions. No one wants that. Besides, understanding how the system works is of immense practical value.

Sometimes these questions cannot reasonably be answered, and those should be closed. But that judgment needs to be made on a case-by-case basis, not an above-the-board rule for a category of questions.

To be fair, though, my opinion on this may differ from the SO community's consensus. The one question I asked about language/framework design got migrated to Programmers. I see others like it there, so perhaps this is the best place to ask from the outset. But if the question is asked on Stack Overflow, the rule about migrations still applies: you only migrate something away if it is deemed off topic for the site it is currently on.

5
  • 7
    +1 for That quickly turns into a slippery slope to having a site full of "debug my code" questions. No one wants that. Besides, understanding how the system works is of immense practical value. Exactly my point of view too. Jun 16, 2014 at 20:12
  • 2
    +1. Interesting point on "don't focus too much on the 'practical' aspect of the site's guidelines". Jun 16, 2014 at 20:14
  • 1
    For C++, many language design decisions are documented in standards committee papers (or, for older decisions, in Stroustrup's Design and Evolution of C++ book). Java decisions are sometimes made on the mailing lists, with public archives. Python has PEPs, and so on for other languages. These resources make "why is feature X designed this way?" perfectly answerable, and often sheds light on good or bad uses for a particular feature. Jun 16, 2014 at 21:58
  • 2
    Indeed, @Jeffrey. And even if the answer were not public knowledge and known only to one or two people, that would not make it off-topic for Stack Overflow, either. These types of questions on the C# and VBScript languages are among former design team member Eric Lippert's most popular and interesting answers. We don't close questions just because they are hard to answer. They have to be impossible to answer because of structural problems with the question, or not have a clear answer (i.e. seeking to start a discussion). Jun 17, 2014 at 7:48
  • 1
    If the language has a rationale document, questions like this can be answered. But it seems likely that in many cases it's either "that's just the way it is" (e.g. PHP doesn't have an indepdendent specification, it has a single implementation along with documentation) or it will result in lots of speculation and/or opinion (so it should be closed as "primarily opinion-based").
    – Barmar
    Aug 7, 2014 at 20:39

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