Re: [PATCH v2 3/3] rust: xarray: add `insert` and `reserve`

From: Miguel Ojeda
Date: Mon Aug 11 2025 - 10:02:15 EST


On Mon, Aug 11, 2025 at 3:43 PM Tamir Duberstein <tamird@xxxxxxxxx> wrote:
>
> I think I prefer to hew close to the C naming. Is there prior art
> where Rust names deviate from C names?

If it is a name that exists in the standard library and that we have
to use (e.g. for another standard type/trait), then sometimes we pick
that name instead of the kernel one.

For certain things, like constructors, we try to follow the usual Rust
conventions.

Moreover, sometimes there has been arguments about the chance to
improve naming on Rust abstractions vs. the underlying APIs, e.g.
`iget_locked()` vs. `get_or_create_inode()`.

But, generally, we stick to the C names unless there is a good reason.
It depends on not just the code, but also the C side maintainers and
their plans.

Cheers,
Miguel