5

If something is known not to be a feature in a language, is it appropriate to ask if a workaround can be discovered?

Is it also appropriate to pose this type of question, if it also shows research, and displays attempts?

Or would showing the attempt be a good candidate for a self-answered question? Or is it considered off-topic?

Is "this is not possible" an acceptable answer?, When is it justifiable to downvote a question?, Question quality is dropping on Stack Overflow

4
  • it depends on the question.
    – Kevin B
    Jun 26, 2020 at 20:54
  • Don't ask "can I do this," ask "how can I do this." Even though you think a workaround might be the only way forward, someone may not use the same definition of the word as you, or there night even be an official way to do what you want. Don't artificially limit your options. Jun 26, 2020 at 20:54
  • I guess the main thing to watch out for is turning into an XY problem. It's probably better to ask something like "I want to do this and I know it can be achieved by Fooing the Bar but it's not available in this language, as far as I'm aware. How can I achieve my goal". It's possible that something is possible but might need a manual implementation or a library. Or maybe there is an alternative way to achieve the same result.
    – VLAZ
    Jun 26, 2020 at 20:56
  • @TheWanderer I agree, that makes sense. I recently asked this question: [stackoverflow.com/questions/62601461] and I was wondering if it is appropriate for the site.
    – 0-1
    Jun 26, 2020 at 20:57

1 Answer 1

12

If something is known not to be a feature in a language, is it appropriate to ask if a workaround can be discovered?

Sort of. I take issue with the "can be discovered" wording. Don't ask if it can be discovered. Ask how to do it. Let the answerers do the discovering.

Is it also appropriate to pose this type of question, if it also shows research, and displays attempts?

Yes. "How do I accomplish x programming task?" is perhaps the most ideal question archetype for Stack Overflow, assuming, of course, that task "x" is reasonably scoped, your question is clear, and you show some evidence of research effort. You've committed to doing all of those things, so I'd say this is fine, if not excellent.

Or would showing the attempt be a good candidate for a self-answered question? Or is it considered off-topic?

If you've found a workaround for what you think is a common problem or point of frustration, then asking a question about the problem and sharing your workaround as a self-answer is perfectly fine.

But if you're not happy with the workaround and are looking for something better, then it might make more sense to leave the discussion of the workaround in the question as part of the background/motivation.

I don't see any reason why that would be off-topic.

Note that it's somewhat difficult to discuss whether hypothetical questions would be off-topic or otherwise unsuitable for this site. If you provide a draft of your question here, we could give better feedback.

5
  • Here's my post that I was wondering about: [stackoverflow.com/questions/62601461]. I posted it, but I immediately regretted that it received a number of downvotes. I would love to learn more on how to create better questions. Feedback would be really appreciated. Thank you for your time. (If there's any way that drafts could be reviewed, just like edits, before posting, that would be wonderful)
    – 0-1
    Jun 27, 2020 at 0:49
  • 1
    @0-1 There's no way to review drafts. The best you could do would be to post it on Meta in a question like this one. I don't know anything about Swift, so I can't really give you any specific feedback on that question. Overall, it looks fine to me, although perhaps a bit long. Reading the comments and in-between the lines, it looks to me like the problem is that people just don't understand why you would want a tuple that contains only one element. It seems a bit like a contradiction in terms and impractical, so they're assuming they don't quite understand your question. This is why they... Jun 27, 2020 at 6:50
  • 1
    ...have cast votes to clarify the question. The first close-voter (matt) is one of our resident Swift experts, and I tend to trust his judgment from my own experience. One of the expectations for SO questions is that they concern practical programming problems. So, strictly abstract questions like, "what if?" don't tend to do well here because they are insufficiently practical. If you could add some practical motivation, that might be helpful. Maybe you have; as I said, not being a Swift expert, I can't say for sure. Note that a mod flag is not a good place to ask for this type of feedback. Jun 27, 2020 at 6:52
  • 1
    Also, I see you're having some trouble inserting links into comments. Please read our comment formatting help. You can either paste the bare link, or you can use the [title](source) notation. You've done simply [source], which doesn't work. Jun 27, 2020 at 6:57
  • thank you so much for the clarifications, it helps a lot. (Also thank you for showing me how to add links to comments)
    – 0-1
    Jun 27, 2020 at 15:35

You must log in to answer this question.

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