[Pulp-dev] 'id' versus 'pulp_id' on Content
jaudet at redhat.com
Thu Jun 21 13:58:57 UTC 2018
> I'm -1 on going the underscore idea, partly because of the aforementioned
> confusion issue, but also partly because but I've noticed that in our API,
> the "underscore" basically has a semantic meeting of "href, [which is]
> generated on the fly, not stored in the db".
> - '_href'
> - '_added_href'
> - '_removed_href'
> - '_content_href'
> So I think if we use a prefix, we should avoid using one that already has
> a semantic meaning (I don't know whether we actually planned for that to be
> the case, but I think it's a useful pattern / distinction and I don't think
> we should mess with it).
so on has led me to believe that the leading underscore means "only touch
if you know what you're doing." However, the _href attribute is something
that I, as an end user, have to use all the time. Thus, the lesson I've
taken away from this naming convention is "pulp abuses naming conventions."
I certainly didn't think that the leading underscore means "generated on
the fly" or "some kind of href." Others might think similarly.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pulp-dev