18

Do questions that ask for a library which is found in the standard language library on-topic for Stack Overflow or off-topic?

The close reason mentions:

Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

But as they are standard library requests they do not tend to attract opinionated answers and spam.

I am however unclear if it is still off-topic. What is the community consensus on this?

2
  • 9
    Consider whether "Is X in the standard library?" would be better asked as "How can I do X in language Y?" Sometimes that's the real question; other times the asker is specifically limited to the standard library. Either way, they don't seem like recommendation questions to me. Commented Dec 20, 2015 at 2:10
  • 1
    @JeffreyBosboom That is a nice insight. Can you add more details to the comment and post it as an answer? Commented Dec 20, 2015 at 7:40

2 Answers 2

18

As I understand it, I believe the rule against recommending a software library exists because there are many options out in the world, anyone can create a new library to solve an existing problem, and it can result in self-promotion of one's library.

To illustrate with examples, asking for "a helper JavaScript library" might result in answers of numerous frameworks and toolkits; asking for "an FFT library" might result in dozens of implementations and pet projects with similar goals and behaviors.


I believe this rule does not apply when asking a question about a language's own standard library, because:

  • If a user is programming in a language, they already have access to the standard library. There is no additional software to install or promote.

  • The standard library usually has one, maybe two, rarely three ways to accomplish the same task. There is an upper bound on how many choices are available.

  • The standard library is a closed system and cannot be added at will by outside participants.

4
  • 2
    Thanks a lot for your answer. Just as I mentioned they do not tend to attract spam. So it is allowed. Good to know that Commented Dec 19, 2015 at 18:51
  • Nayuki, I think your post answers my question the best. However, I would like to wait for a few other answers. Thanks. Commented Dec 19, 2015 at 19:22
  • 1
    Yeah, I'd like to hear what others think too. Plus there's no reputation at stake on Meta SO.
    – Nayuki
    Commented Dec 19, 2015 at 20:19
  • Well I guess that's it. I'll accept your answer :) Commented Jan 1, 2016 at 11:03
13

Maybe I'm thinking of something else than you had in mind when asking this question but this is how I see it.

A question that looks like this

Is there a library for doing ${stuff} in ${language}?

is always off-topic. Even if the standard library for ${language} provides a feature to do ${stuff}. It can, however, be salvaged by re-wording it.

How can I do ${stuff} in ${language}?

A question of the latter form can be on-topic regardless whether ${language}'s standard library has a feature for it or not. If it has, that makes a valid answer. If it has not, the question may still be answered by providing guidance to a self-made solution or suggesting a library (with explanation).

The reason we object library recommendation questions in not that we dislike people using libraries but that questions that already imply that the correct solution is using a third-party library tend to trigger poor answers and steer them in a potentially harmful direction. Even if the standard library has a feature, there might be third-party libraries that do better for some cases and an answer that discusses the pros and cons of either approach can be a very useful reference.

1
  • 1
    True, this was my initial perception before I asked the question. Commented Dec 20, 2015 at 12:56

You must log in to answer this question.

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