Skip to content

Should we rename "identity" as "reference" in javadoc? #735

Closed

Description

@ajkannan

In services that have model objects with "id" as a field, we try to differentiate between that "id" field and the "identity" of that object (the information necessary to reconstruct/access that object via the service). For example, blobs have "id" fields, but gcloud-java-storage also has a BlobId class that contains the bucket name, blob name, and generation.

In the javadoc, we use "identity" to describe classes like BlobId. I feel that "reference" is a slightly better word than "identity" because "reference" is a more commonly used word and thus would make the javadoc read more nicely. Also, "id" is a shorthand for "identity" (and a user could potentially assume they're related), whereas "reference" might differentiate the two items more clearly.

Activity

  1. mziccard commented on Mar 10, 2016

    @mziccard
    Contributor

    I agree that reference is more commonly used but also has a different meaning in the context of programming.

  2. mderka commented on Mar 11, 2016

    @mderka

    -1 for this rename. I have seen "identity" referring to a rather complex compounded object descriptor which is exactly what we are doing in this case. Thus, it seems natural. I would be struggling with understanding the meaning of a "reference".

  3. ajkannan commented on Mar 12, 2016

    @ajkannan
    Author

    Alright, closing this as it seems like identity is more popular.

  4. 5 remaining items

  5. added a commit that references this issue on Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Sponsor
    SponsoredKunjungi sekarang
    Promo