w3c-ccg / did-spec

Please see README.md for latest version being developed by W3C DID WG.
https://w3c.github.io/did-core/
Other
124 stars 45 forks source link

Single or plural for property names #46

Closed msporny closed 6 years ago

msporny commented 6 years ago

Should we use singular or plural form for property names. That is, is it service or services, publicKey or publicKeys?

dlongley commented 6 years ago

I vote for singular.

People have had issues with choosing plural and regretting it -- particularly when common usage becomes singular (which you won't know until it's out there in the wild) or when non-English speakers are involved. I think it's perfectly palatable to use a singular name for a property with a value that's an array anyway (e.g. foo.service[0] is the first service, foo.service[1] is the second service, etc.). I tend to think there's less danger in messing things up since it's less awkward to "evolve" from a singular name to a plural name than vice versa.

This approach is also in line with what seems to be emerging as best practice with Linked Data, for example, schema.org vocabulary designers found that singular was a better idea.

gkellogg commented 6 years ago

I agree with singular; schema.org went through this a while ago and deprecated all of their plural property names for singular. For example http://schema.org/actors was supersededBy http://schema.org/actor.

mikelodder7 commented 6 years ago

I'm okay with that as long as the spec reflects it everywhere. I noticed in some places it has plural and other places have singular. This is mostly a consistency issue.

msporny commented 6 years ago

Fixed to use singular form everywhere. Let me know if I missed any plural form terminology.