I wrote the following.

How should I approach the design of such a class?

I got corrected by another user to this.

How should I approach the design of such class?

While colloquially acceptable, I'm not sure if it's a correction that's valid. Apparently it didn't sound properly smooth in the reader's mind. However, I wonder if it's a case of counter-intuitive correctness or an incorrectly stale grammar on my side.

  • What is class here? Something you teach? Something you code? Or what?
    – Lambie
    Sep 14 at 14:45
  • @Lambie As stated in the question title, class here is a noun. I can't see that the actual intended meaning affects the grammatical correctness. However, I may be wrong, so feel free to discuss the issue further in form of an answer. It may behoove other users to see the usage of the indefinite article in different contexts. Sep 14 at 15:44
  • A class you teach and a class of things you program are both nouns. You need to provide context and not ask us to come up with all possible interpretations of the word class. By the way, it's better to use: How should I approach the design of a class such as this/such as this one?
    – Lambie
    Sep 14 at 15:50
  • @Lambie Both are nouns and the mean different things. However, unless you're saying that the correctness of the explicit attribute depends on which meaning of said noun that's intended, that's irrelevant for the question. I'm not asking about style of the formulation, although your suggestion is appreciated. Only grammatical side is considered (which is apparent from the tags on the question) and in regard to this specific wording. So, no context is required, as far I can see. And if the meaning does affect the correctness, let's list them individually. Sep 14 at 15:58

Your grammar checker is just wrong. You were right the first time; "such a class" is the only correct option, both formally and colloquially.

It's possible the checker was thinking of "class" as in "the property of being classy; elegance of style," which is uncountable. Just one example of the limitations of these kinds of grammar checkers.

  • I'm sure the checker didn't think that. Because the checker is a user on StackOverflow and we're talking about design of a certain class, being a facility for a certain task. He doesn't find my source code classy in any way. In fact, he was explicit: this being a questionable design. No classy sensation there. (I'm not objecting to his statement, though. He's right, IT-wise. But I'm going to strike him grammatically.) Sep 14 at 15:41
  • @KonradViltersten Ah, my mistake, I assumed it was an automated checker like Grammarly. Sep 14 at 20:03
  • Nope, it was a live person (or at least a very human'like bot). Also, not that it's relevant here, it turns out that it was me who made the mistake and he who corrected it. I confused what's addition and what's original. Embarrassing... I wasn't clear in my formulation of my question, I guess. I'll edit. Sep 14 at 20:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.