On Fri, Mar 6, 2026 at 9:11 AM Chao Li <[email protected]> wrote:
>
> But I think we should avoid to introduce such usages in new code. In other 
> words, while reviewing patches, we should raise comments for such mis-usages. 
> Is my understanding correct?

I also don't like how BlockNumber is used this way. However, if you
introduce a new counter and use uint32 instead when all surrounding
counters are BlockNumber, it sticks out as different and is confusing.
If you go and change all instances of BlockNumber being used this way
because you added one new counter, that's a lot of churn. If we decide
to change BlockNumber to a struct, we'll have a good reason and be
willing to pay the price of the churn at that point. I'm not a
stickler for consistency and in fact think it's okay to have some
things inconsistent if it means introducing new patterns that are
better. But having a single counter in a struct of the same unit as a
bunch of existing counters be a different datatype doesn't seem worth
it to me.

- Melanie


Reply via email to