10

I just found a question which is asking for an example of a type checking error.

I know it is neither asking for tutorials nor complete code, so is this type of question on-topic?

1
  • 9
    Oh jeez he asked in the c++ tag... RIP little dude.
    – user1228
    Commented Oct 27, 2016 at 16:15

2 Answers 2

2

First of all, I would say it is not a very good question, and it is probably deserving of being downvoted. That doesn't automatically mean it needs to be closed, though. In the case of this specific question, a "too broad" close vote would not be unreasonable, given how many utterly trivial examples might be provided as answers (Cf. the first clause of the "too broad" reason: "There are either too many possible answers, or good answers would be too long for this format [...]").

Not all example requests, however, fall under "too broad" -- far from it. Suppose that, rather than "What is an example of a type error", the question was "What is an example of [a scenario, involving an advanced feature, that triggers a corner case the OP is worried about]?". Questions of this sort are not too broad under any reasonable definition of "too broad". Furthermore, even if one wants to be pedantic and reply with "It doesn't matter! There are infinite possible examples, and so there are infinite possible answers, which makes the question infinitely broad!", the question can be rephrased with minimal losses as "In which conditions [the corner case, etc.] is triggered?", which is not too broad under any definition, and whose answers can very naturally provide the desired examples. (Weren't it for the OP claiming that "I know what type checking is and how it works and all", such a strategy might even be tried with our concrete case, turning the question into "What is a type error in C++?", though in this case it would only lead us into arguing whether that is too broad as well.)

-3

It's borderline.

  • It's not really asking for a third party resource -- as the requested examples fit neatly in an answer (or just a comment).
  • And it's not primarily opinion based as a given example either works or it doesn't.
  • Nor is it too broad as it can be answered with just a terse example.

It doesn't really fit the standard close reasons and I can see where it could be useful to newbies.
But theoretically it could result in a laundry list of examples, where only one is needed. So there is the potential for clutter.

I say give the OP the benefit of the doubt, for now, (after making sure it's not a duplicate question).

But this kind of example should probably be handled via the Documentation section.

2
  • 7
    Oh boy, yes! Let's make a big list of all possible type mismatch errors in the documentation for every statically-typed language! Who wants to start?
    – Cody Gray Mod
    Commented Oct 28, 2016 at 14:07
  • 2
    @CodyGray, Oh boy yes! Lets automatically assume the worst for every hypothetical! You're imagining a problem that hasn't happened yet. (neither statistically, nor in this instance) Commented Oct 28, 2016 at 15:49

You must log in to answer this question.

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