From: Tamir Duberstein <tamird@gmail.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: "Alice Ryhl" <aliceryhl@google.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Maíra Canal" <mcanal@igalia.com>,
"Asahi Lina" <lina@asahilina.net>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v10 2/2] rust: xarray: Add an abstraction for XArray
Date: Tue, 3 Dec 2024 11:01:13 -0500 [thread overview]
Message-ID: <CAJ-ks9kxkd5bgbDuSwEru7RAmxp5D4HXrJNe-m=2EFm+_Ep9Ag@mail.gmail.com> (raw)
In-Reply-To: <CANiq72=8kyfRomVijZO-5tW-Ckuf5KshCTYnHt96CSi6PbDkqA@mail.gmail.com>
On Tue, Dec 3, 2024 at 10:22 AM Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> On Tue, Dec 3, 2024 at 4:00 PM Tamir Duberstein <tamird@gmail.com> wrote:
> >
> > I prefer to be explicit, unless there's guidance on this somewhere?
>
> I like explicitness in general, but do you think there is an advantage
> for things in the prelude?
>
> I am asking because I am considering adding more things there, e.g. I
> have a series to be sent to add the `ffi::c_*` types -- having things
> like those in the prelude reduces the noise in imports that everyone
> knows about (and that nobody should be tempted to alias anyway), makes
> things more consistent (because then every use is unqualified vs. the
> mix we have now) and generally the code looks easier to read to focus
> on the other things that may be less common.
I agree with these goals, but I personally disprefer the prelude
approach. Probably the most common misuse involves traits in the
prelude, where importing them can change function call resolution.
It's very likely that this isn't a problem with the prelude currently,
but it also doesn't seem to be used consistently everywhere. I don't
feel very strongly, so if there's a mandate to use it then I'll do so.
next prev parent reply other threads:[~2024-12-03 16:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <8afOg1gqssfIosuFD71f-eCLAHFSeGtzFU9qi-FzHX2T8kEkLMkk56HrWwUfVxoMCo8UlbKPaxjcJoixKhT8_g==@protonmail.internalid>
2024-11-20 11:48 ` [PATCH v10 0/2] rust: xarray: Add a minimal abstraction for XArray Tamir Duberstein
2024-11-20 11:48 ` [PATCH v10 1/2] rust: types: add `ForeignOwnable::PointedTo` Tamir Duberstein
2024-11-25 14:49 ` Alice Ryhl
2024-11-25 14:52 ` Tamir Duberstein
2024-11-25 15:33 ` Andreas Hindborg
2024-12-03 11:51 ` Andreas Hindborg
2024-11-20 11:48 ` [PATCH v10 2/2] rust: xarray: Add an abstraction for XArray Tamir Duberstein
2024-12-03 12:16 ` Andreas Hindborg
2024-12-03 15:00 ` Tamir Duberstein
2024-12-03 12:30 ` Alice Ryhl
2024-12-03 15:00 ` Tamir Duberstein
2024-12-03 15:11 ` Alice Ryhl
2024-12-03 15:57 ` Tamir Duberstein
2024-12-03 15:22 ` Miguel Ojeda
2024-12-03 16:01 ` Tamir Duberstein [this message]
2024-11-25 7:58 ` [PATCH v10 0/2] rust: xarray: Add a minimal " Andreas Hindborg
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='CAJ-ks9kxkd5bgbDuSwEru7RAmxp5D4HXrJNe-m=2EFm+_Ep9Ag@mail.gmail.com' \
--to=tamird@gmail.com \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=lina@asahilina.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mcanal@igalia.com \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--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).