Re: [PATCH 14/23] hash.h, repository.h: reverse the order of these dependencies
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 20, 2023, 15:54 UTC
- Message-ID
- <xmqqpm7y4kht.fsf@gitster.g>
- In-Reply-To
- <947db4da-13d9-d81a-1c0c-d8fe62a9279f@github.com>
Derrick Stolee <derrickstolee@github.com> writes:
Show 5 quoted lines
> This is mostly because most consumers in the Git codebase will want > these methods, and only the most fundamental hashing code will care > about hashing separate from the_hash_algo. So, the most-natural name > for "the header file that lets me hash stuff" would be "hash.h" and > "hash-basics.h" is for "I'm doing very simple, low-level hashing".
I do agree with the reasoning for "most people want 'hash.h'"; what is called the "basics" sounds more like for advanced users of the low-level machinery, but somehow I expect "basic" would the one to be used in sample programs in tutorials or something. "ll-hash.h" for low-level hash features? I dunno.
But whatever the name for the header file meant to be used by "advanced callers to low-level machinery" would be, I like your choice of the latter variant between the ones Elijah presented.
Thanks.