7

I started working through the "Primarily Opinion-Based" votes, and an inordinate amount of them are about naming conventions.

I'm not saying that we should Burninate the tag, but rather what the minimum effort of such posts should be. I've seen a broad range, and my initial judgment is that they're all out of the scope. However, it seems that there is a group that wants to keep them around.

So, what should the bare-minimum be when reviewing these questions for whether they should be on-topic?

2
  • there is also probably a lot of room form marking a lot of these as duplicates and linking them to other, more canonical answers.
    – DForck42
    Commented Nov 9, 2016 at 17:11
  • I was just about to think about posing such a question, but was sceptic and decided to check the meta-forum first - bingo, this thread just now. Fact is that for SO newbies like me it is easy to slip into this trap, but also I prefer clearly a fact-based technical repository of issues, not diluted by "Should I better write this - or that - what does the cloud say?"
    – Dr. V
    Commented Nov 9, 2016 at 19:09

1 Answer 1

4

Two factors that can make questions on-topic:

  • The convention is not merely a stylistic choice; there is some objective advantage in following it. (For instance, there might be libraries or tools that expect it to be followed.)

  • The convention is not arbitrary; rather, it reflects some important characteristic of whatever is being named in a well-known and well-documented manner. (In such cases, a question about why a convention exists can be objectively answered, in a way that provides insight about the subject matter.)

Either of these two factors (there might be more) is, in principle, enough to bring a question away from the primarily opinion-based/"does this look good"/"what does your team use" spectrum.

5
  • I can't think of any situations where not following a convention can lead to a non-working code. Could you please post examples?
    – Bálint
    Commented Nov 9, 2016 at 18:04
  • 1
    @Bálint One possibility is meta-programming. For instance, let's say a library automatically generates some extra code for each identifier that starts with an underscore. That being so, someone unfamiliar with the library might, when looking at code that uses it, wonder why there are so many leading underscores sprinkled around.
    – duplode
    Commented Nov 9, 2016 at 18:10
  • 1
    Not to date myself too obviously, but in good ole' asp.net web forms, if you didn't name a method control_eventName, it wouldn't get picked up as an event handler. Commented Nov 9, 2016 at 18:47
  • @Bálint Before annotations were added to Java, methods were often discovered reflectively by having a name prefix, such as test for JUnit tests. Without it, your tests simply don't get called. I can't think of a good example offhand, but I've also worked with systems that expected ClassnameFactory to exist for classes passed into the system, and so on. Commented Nov 10, 2016 at 2:39
  • @Bálint if you know hibernate, on boolean by default eclipse will generate "isXXX" getter while Hibernate only use "getXXX" getter. So yes it can happen :)
    – Walfrat
    Commented Nov 10, 2016 at 12:43

You must log in to answer this question.

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