From: Andreas Hindborg <a.hindborg@kernel.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: FUJITA Tomonori <fujita.tomonori@gmail.com>,
aliceryhl@google.com, alex.gaynor@gmail.com, ojeda@kernel.org,
boqun.feng@gmail.com, anna-maria@linutronix.de,
bjorn3_gh@protonmail.com, dakr@kernel.org, frederic@kernel.org,
gary@garyguo.net, jstultz@google.com,
linux-kernel@vger.kernel.org, lossin@kernel.org,
lyude@redhat.com, rust-for-linux@vger.kernel.org,
sboyd@kernel.org, tglx@linutronix.de, tmgross@umich.edu
Subject: Re: [PATCH v1] rust: time: make ClockSource unsafe trait
Date: Fri, 04 Jul 2025 09:13:45 +0200 [thread overview]
Message-ID: <87ms9ktoly.fsf@kernel.org> (raw)
In-Reply-To: <CANiq72m886R2ZOLSSzehU8aTXzYtPmTyyrSxpOQCr7GX_Bcghg@mail.gmail.com> (Miguel Ojeda's message of "Fri, 4 Jul 2025 08:42:07 +0200")
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> writes:
> On Fri, Jul 4, 2025 at 2:08 AM FUJITA Tomonori
> <fujita.tomonori@gmail.com> wrote:
>>
>> I had a quick look at the official Rust documentation, and I think I
>> agree with this opinion.
>
> My personal take: I agree that having both English and something else
> is a bit redundant -- some redundancy is good when something (like a
> notation) may be non-obvious, but I think a math integer interval or a
> Rust range or a condition like 0 <= v <= `KTIME_MAX` are all
> understandable in this context.
>
> Now, whether to use English or any of the other options, it is hard to
> say what is best for most readers. Personally, I prefer to just see
> one of the expressions, which makes it also closer to other forms,
> e.g. a debug assert somewhere, or a contract, or other tooling or
> formalization efforts.
I would prefer `0..=KTIME_MAX` or `0 <= v <= KTIME_MAX`. English prose
is also OK and I won't object to that, but I prefer the others.
Best regards,
Andreas Hindborg
prev parent reply other threads:[~2025-07-04 7:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-30 13:10 [PATCH v1] rust: time: make ClockSource unsafe trait FUJITA Tomonori
2025-06-30 13:33 ` Alice Ryhl
2025-06-30 23:39 ` FUJITA Tomonori
2025-07-02 8:38 ` Andreas Hindborg
2025-07-02 9:17 ` Andreas Hindborg
2025-07-02 9:50 ` Alice Ryhl
2025-07-04 0:07 ` FUJITA Tomonori
2025-07-04 6:42 ` Miguel Ojeda
2025-07-04 7:13 ` Andreas Hindborg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ms9ktoly.fsf@kernel.org \
--to=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=anna-maria@linutronix.de \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=frederic@kernel.org \
--cc=fujita.tomonori@gmail.com \
--cc=gary@garyguo.net \
--cc=jstultz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=lyude@redhat.com \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
--cc=tmgross@umich.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).