2

I would like to know if questions regarding readability/coding conventions are on-topic here.

I'm learning a new language, and in the official documentation they routinely add whitespace in a way that reads very strangely to me. I was going to just go with it, but then I saw that about 70% of tutorials and code snippets online remove the odd whitespace, and only about 30% do it the prescriptive way.

My question is essentially "is there an actual reason (readability, etc.) to follow the prescriptive convention, or is this something stylistic that doesn't really matter?"

Sometimes little things really do make a difference (ex. in some languages ALL_CAPS means I'm probably looking at a constant, and that's an actual readability improvement when everyone follows the same convention), and sometimes they don't (ex. I always put my { on the line after the function declaration, and some people will fight to the death that that's a wasted line, but it doesn't actually affect people's ability to read your code).

So, are questions like this appropriate here?

2
  • 2
    The overwhelming majority of these questions are essentially opinion polls, which aren't a good fit for any StackExchange site. Only if there's a concrete, technical issue that motivates the style could we give you an actual answer, but even then it'd probably encourage more opinions than technical details.
    – Ixrec
    Nov 21, 2015 at 5:07
  • related: On the troubles of naming and terminology
    – gnat
    Nov 21, 2015 at 8:47

1 Answer 1

4

We do have tags that cover the topics you're asking about: , and I'd consider them to be in-scope of the site. But I'd generally have the same concern as the comments pointed out - you would need to avoid highly opinionated questions and polls, which may be difficult to do when talking about code style.

Note that I wouldn't necessarily even use open questions in these tags to make a claim that a specific question is good. I'm not sure if they've been cleaned up or how recently they've been cleaned up. I think that you are experienced enough with the SE model (being a moderator and having significant rep on multiple sites) to know what kinds of questions are generally acceptable and not, but I don't want anyone else finding this question/answer to get the wrong idea.

You must log in to answer this question.

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