[GODRIVER-1709] Rename ObjectID to ObjedId (Standard) Created: 08/Aug/20  Updated: 27/Oct/23  Resolved: 10/Aug/20

Status: Closed
Project: Go Driver
Component/s: API, BSON
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Megadimension Neptunia VII Assignee: Divjot Arora (Inactive)
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The naming convention for ObjectId across all products is ObjectId, except for the mongo-go-driver, where it is Object+ID+ with a Capital ID, for no reason whatsoever (this is neither some Go Golang community standard nor does it make any other sense).

This is a bug and this request aims to finally normalize the style of writing of ObjectId in the mongo-go-driver to ensure product quality across all MongoDB drivers.



 Comments   
Comment by Divjot Arora (Inactive) [ 10/Aug/20 ]

Hi realtimetodie@gmail.com,

This type is named ObjectID because of the reasoning in https://github.com/golang/go/wiki/CodeReviewComments#initialisms. We've historically enforced consistent style for the Go Driver using the golint tool (https://github.com/golang/lint), which errors if we don't follow the CodeReviewComments guidelines. This specific rule about capitalizing abbreviations and acronyms seems to be a particularly controversial one in golint (see https://github.com/golang/lint/issues/89 and https://github.com/golang/lint/issues/124) and there is a proposal to deprecate golint altogether (https://github.com/golang/go/issues/38968). However, renaming the type at this point in time would require a v2 release of the driver per semantic versioning and would cause a lot of code churn in our users' code, so we don't feel it's a worthwhile change.

Comment by Megadimension Neptunia VII [ 08/Aug/20 ]

xD

Comment by Megadimension Neptunia VII [ 08/Aug/20 ]

ObjectId in the title

Generated at Thu Feb 08 08:36:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.