rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boqun Feng <boqun.feng@gmail.com>
To: David Howells <dhowells@redhat.com>
Cc: Matthew Wilcox <willy@infradead.org>,
	Kent Overstreet <kent.overstreet@linux.dev>,
	lsf-pc@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org,
	rust-for-linux@vger.kernel.org,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	Alice Ryhl <aliceryhl@google.com>,
	Wedson Almeida Filho <wedsonaf@gmail.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>,
	Kees Cook <keescook@chromium.org>, Gary Guo <gary@garyguo.net>,
	Dave Chinner <dchinner@redhat.com>,
	Ariel Miculas <amiculas@cisco.com>,
	Paul McKenney <paulmck@kernel.org>
Subject: Re: [LSF/MM TOPIC] Rust
Date: Tue, 23 Jan 2024 19:57:20 -0800	[thread overview]
Message-ID: <ZbCKoKB4OXzeTIgo@boqun-archlinux> (raw)
In-Reply-To: <201190.1706050689@warthog.procyon.org.uk>

On Tue, Jan 23, 2024 at 10:58:09PM +0000, David Howells wrote:
> Matthew Wilcox <willy@infradead.org> wrote:
> 
> > I really want this to happen.  It's taken 50 years, but we finally have
> > a programming language that can replace C for writing kernels.
> 

(I'm not sure Matthew wants to rewrite the existing kernel piece in
Rust, my read is more like he feels Rust can be used for new or
experimental stuffs)

> I really don't want this to happen.  Whilst I have sympathy with the idea that
> C can be replaced with something better - Rust isn't it.  The syntax is awful.
> It's like they looked at perl and thought they could beat it at inventing
> weird and obfuscated bits of operator syntax.  Can't they replace the syntax
> with something a lot more C-like[*]?
> 

Isn't the feeling on the syntax (like, hate or can live with) really
based on personal experience? I'd rather not use this as an argument,
since I can find syntax haters for every language ;-)

> But quite apart from that, mass-converting the kernel to Rust is pretty much
> inevitably going introduce a whole bunch of new bugs.
> 

Desite whether this is what gets proposed here, I do really want to
agree with you, but I'm not able to tell whether this is an educational
prediction or unnecessary worry, since I could say the same thing for
every patchset that adds new features ;-)

To me, it doesn't matter which language wins the "best C replacement for
kernel programming" award, the lessons we learn from Rust-for-Linux will
likely apply for any other "high-level" language. Hope that we can all
agree on that it's all OK that people want to try out new stuffs and see
if they *actually* work. Because then we can discuss on something
concrete and objective.

Regards,
Boqun

> David
> 
> [*] That said, we do rather torture the C-preprocessor more than we should
> have to if the C language was more flexible.  Some of that could be alleviated
> by moving to C++ and using some of the extra features available there.  That
> would be an easier path than rusting the kernel.
> 
> 

  reply	other threads:[~2024-01-24  3:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23  4:23 [LSF/MM TOPIC] Rust Kent Overstreet
2024-01-23 19:09 ` Matthew Wilcox
2024-01-23 21:04   ` Boqun Feng
2024-01-24 14:26   ` James Bottomley
2024-01-24 15:43     ` Matthew Wilcox
2024-01-24 16:04       ` James Bottomley
2024-01-24 18:50         ` Kent Overstreet
2024-01-24 19:23           ` Morten Linderud
2024-01-24 19:43           ` James Bottomley
2024-01-24 19:57             ` Kent Overstreet
2024-01-25  3:47               ` James Bottomley
2024-01-25  9:24                 ` Kent Overstreet
2024-01-25 21:30                   ` James Bottomley
2024-01-23 22:58 ` David Howells
2024-01-24  3:57   ` Boqun Feng [this message]
2024-01-24 21:20   ` Kent Overstreet

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=ZbCKoKB4OXzeTIgo@boqun-archlinux \
    --to=boqun.feng@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=amiculas@cisco.com \
    --cc=brauner@kernel.org \
    --cc=dchinner@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=gary@garyguo.net \
    --cc=keescook@chromium.org \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=paulmck@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=wedsonaf@gmail.com \
    --cc=willy@infradead.org \
    /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).