Skip to content

Variability between property name prefixing #6

Answered by travisgosselin
lehn0058 asked this question in Q&A
Discussion options

You must be logged in to vote

The goal of the existing standards was to provide consistent naming on properties and what they are associated to for not just IDs but for all property types. Are you advocating that "id" is an exception to that rule only? or that ALL properties should have prefixes?

I think I prefer that consistency on all properties without the prefix on any, than having an exception for id. I cannot say I have experienced the confusion you have in other APIs that have taken this approach. Even in your example when using item.id that is obvious to me that it is the id of the object (item). If the variable was poorly named... obviously thats a different issue.

Looking at some of our reference APIs, i.e. …

Replies: 1 comment 15 replies

Comment options

You must be logged in to vote
15 replies
@acchristensen
Comment options

@travisgosselin
Comment options

@acchristensen
Comment options

@travisgosselin
Comment options

@lehn0058
Comment options

lehn0058 Mar 24, 2022
Collaborator Author

Answer selected by travisgosselin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
major-change Contract breaking modification to existing API Standard details.
5 participants