lkml.org 
[lkml]   [2022]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 00/13] [RFC] Rust support
On Mon, Jul 18, 2022 at 8:56 AM Olliver Schinagl
<oliver+list@schinagl.nl> wrote:
>
> Absolutly, but with the many luitenants, many tree's, and not a single
> CI source, this would still be tricky in the end; but certainly possible.

A bot in -next (possibly an existing one) is a single thing to care
about and the amount of maintainers/trees doesn't have an effect on
it, thus I don't think it would be tricky.

> I think this is a pretty poor argument for following Rust's opinionated
> view of the world. E.g. it's generally bad to copy/paste code to begin
> with. How many 'bugs' that we know of are copy/paste bugs?

We will have to disagree. Consistency and simplicity are fine
arguments in my book, not "pretty poor" ones.

I don't see the relevance of the copy/paste code discussion here. But
assuming the analogy makes sense, I don't agree that reusing code is
"generally bad" either.

Anyway, given you mention "bugs", I think you are implying that the
defaults are somehow "incorrect" (not accessible?). In that case, to
improve things for all Rust developers out there, I would suggest
opening an issue in https://github.com/rust-dev-tools/fmt-rfcs.

> Secondly, and more importantly so; you argue 'who cares about people
> with disablements, atleast its equally hard to read everywhere' which is
> a very poor argument :p

No, and I want to be __very__ clear about this: at no point I have
argued "who cares about people with disabilities" or anything like it.
It is insulting that you even suggest it.

Likewise, you are the one claiming it is "hard to read", not me.

And then after constructing those straw men, you call them "a very
poor argument"...

> Finally, it must of course be mentioned, that rust is really trying to
> do an XKCD here, https://xkcd.com/927/ though I'm sure we'll get it
> right this time around ;)

How does that even apply here? There is no "standard" for formatting
across languages, if that is what you are saying.

Actually, what is happening here is that there is an "official" tool,
called rustfmt, that most Rust code out there uses.

By not using it, it is you the one that may be creating a XKCD
situation, if anything.

And to be clear, we don't necessarily follow "Rust's biased view". For
instance, there is also an "official" build tool, called Cargo, that
most Rust code out there uses; yet we are not using it for the kernel.

We are actually doing things how we think are best for the kernel. Not
because "Rust" (whatever or whoever that is) is "trying to do an
XKCD". Not because we are "following Rust's opinionated view of the
world" or "Rust's biased view".

> But you are not, only those that follow rust's biased view. Everybody
> else that has a different opinion (like die-hard C programmers) that
> care enough (I'm sure there's plenty) would setup their rustfmt config
> file to resemble their C code; and thus the entire premisis is broken.
> Though; yes, in a perfect world it could have worked like this, but xkcd
> again :)

No. I said we are being consistent with the majority of the Rust code
out there, not with "everybody".

If, instead, we try to be consistent with the kernel C style, then you
are likely not being consistent with the majority of the Rust code out
there. And you would have to decide exactly how to map the C style to
Rust constructs and which particular kernel style.

Again: I personally don't mind what the particular style is. As a
project, what we value the most is having a single style across it and
not having to think about formatting. Nevertheless, I think there is
also value in being consistent with the majority of the Rust code out
there.

> This though is a fair argument I understand, it would be weird in having
> 2 styles in user-space and kernel-space code; though I see this
> happening today as well; where developers follow kernel style for kernel
> code (obviously) but use their preferred 2 or 3 space style on their
> userland code. Trying to 'force' this, usually however never gets the
> intended result ...

If we follow the usual Rust style in the kernel, I would say it is
more likely that both styles match.

Cheers,
Miguel

\
 
 \ /
  Last update: 2022-07-20 21:24    [W:0.122 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site