Re: [PATCH v9 01/13] rust: hrtimer: introduce hrtimer support
From: Andreas Hindborg
Date: Fri Mar 07 2025 - 04:10:15 EST
"Tamir Duberstein" <tamird@xxxxxxxxx> writes:
> On Wed, Feb 26, 2025 at 6:48 AM Andreas Hindborg <a.hindborg@xxxxxxxxxx> wrote:
>>
>> "Tamir Duberstein" <tamird@xxxxxxxxx> writes:
>>
>> > Sorry, I meant HasHrTimer and HrTimerPointer rather than HrTimer and
>> > HrTimerPointer.
>>
>> `HasHrTimer` is named so because it is meant to be implemented by types
>> that contain a field of type `HrTimer`.
>>
>> `HrTimerPointer` is meant to be implemented by pointer types that point
>> to types that implement `HasHrTimer`.
>>
>> They are different, and the naming reflect that.
>>
>> I will not rename `HasHrTimer` to `ContainsHrTimer`, because the rest of
>> the rust kernel uses the `HasFoo` naming scheme.
>
> The Has prefix makes sense in HasHrTimer. Shouldn't the name
> HrTimerPointer also contain "Has"? HasHrTimerPointer would be
> confusing, but perhaps PointerToHasHrTimer? It's a mouthful to be
> sure.
I get your point, but I really think that `HasHrTimer` and
`HrTimerPointer` is pretty good. Names _can_ get too long.
Best regards,
Andreas Hindborg