This might be a bit technical, but I'll try not to dive into details too much. The sentence I'm talking about is:

Attribute name must be unique among attributes of an object.

Meaning, there are objects. Each object has attributes (name, value). And if we take one arbitrary object, all its attribute names must be unique. Is my wording okay? Is there a better way to say this?

  • Each object can have an unlimited number of names? Jul 12 '16 at 13:42
  • 1
    Not names, attribute names. Each object has attributes, each attribute has a name. Attribute is a name/value pair (like, color - blue). If we consider one particular object, its attribute names must be unique (no two attributes with name "color"). And speaking of number of things, we can assume that each object has unlimited number of attributes, if that matters. On a side note, is this part of my comment okay? "like, color - blue"
    – x-yuri
    Jul 12 '16 at 13:53
  • Yes, your comment is clear and precise. Now I understand. Jul 12 '16 at 13:59

This is probably fine, but I think it would sound better to rearrange the sentence so that you don't use the word "attribute" twice in one sentence. Using a word multiple times in a single sentence or using a word many times in a short space is considered a poor practice. In this case I personally would just delete the sentence once I decided it sounded bad and try to think about how I can combine it with the ideas that come before and after it to avoid the repetition of the word.

I personally might change this to "For each object, attribute name must be unique." Or if you were already talking about the attributes in the previous sentence, you might just say "Attribute name must be unique"

  • The important point here is that two different objects can have attributes with the same name. It's one object, that can't have two attributes with the same name. So your last phrasing ("Attribute name must be unique") likely can't be used in given context.
    – x-yuri
    Jul 12 '16 at 14:01

I think I understand the technical area of which you speak.

Your phrasing is clear and understandable but feels slightly wrong.

Attribute name must be unique among attributes of an object.

somehow the among attributes doesn't quite work as we don't say it's unique amongst the names of the attributes. How about

For any object instance, the names of its attributes must be unique.

Possibly you could clarify your meaning by indicating what would happen if a person attempted to violate this constraint.

For any object instance, the names of its attributes are unique. If you attempt to add an attribute which is the same as that of a pre-existing attribute the new value will replace the old one.

  • So, if I were to use "among attributes", I should say, "among the names of the attributes of the object", not "among the attributes..."? Then, speaking of "we don't say" part, I can see "unique among its kind" in google, so "unique among" must be generally valid thing to say. Can you explain what's wrong with using it in this context? Maybe, it's just too many words for something that can be expressed more concisely?
    – x-yuri
    Jul 12 '16 at 14:14
  • Unique among is valid. It was just that in order to be technically precise we really should spell out that it's "unique among the names of the attributes" and this just seems clumsy. Hence my suggestion (and Patrick's similar one) to come up with something more succinct. As you say, finding a nice concise expression is preferable. I find this in technical writing, in our desire to be unambiguous we can end up being very verbose.
    – djna
    Jul 12 '16 at 14:28

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.