[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <70efae6ae16647ddbb2b2c887e90e7c8@AcuMS.aculab.com>
Date: Fri, 1 Dec 2023 17:25:59 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Benno Lossin' <benno.lossin@...ton.me>,
Theodore Ts'o <tytso@....edu>
CC: Alice Ryhl <aliceryhl@...gle.com>,
"a.hindborg@...sung.com" <a.hindborg@...sung.com>,
"alex.gaynor@...il.com" <alex.gaynor@...il.com>,
"arve@...roid.com" <arve@...roid.com>,
"bjorn3_gh@...tonmail.com" <bjorn3_gh@...tonmail.com>,
"boqun.feng@...il.com" <boqun.feng@...il.com>,
"brauner@...nel.org" <brauner@...nel.org>,
"cmllamas@...gle.com" <cmllamas@...gle.com>,
"dan.j.williams@...el.com" <dan.j.williams@...el.com>,
"dxu@...uu.xyz" <dxu@...uu.xyz>,
"gary@...yguo.net" <gary@...yguo.net>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"joel@...lfernandes.org" <joel@...lfernandes.org>,
"keescook@...omium.org" <keescook@...omium.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"maco@...roid.com" <maco@...roid.com>,
"ojeda@...nel.org" <ojeda@...nel.org>,
"peterz@...radead.org" <peterz@...radead.org>,
"rust-for-linux@...r.kernel.org" <rust-for-linux@...r.kernel.org>,
"surenb@...gle.com" <surenb@...gle.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"tkjos@...roid.com" <tkjos@...roid.com>,
"viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
"wedsonaf@...il.com" <wedsonaf@...il.com>,
"willy@...radead.org" <willy@...radead.org>
Subject: RE: [PATCH 1/7] rust: file: add Rust abstraction for `struct file`
From: Benno Lossin
> Sent: 01 December 2023 15:14
>
> On 12/1/23 16:04, Theodore Ts'o wrote:
> > On Fri, Dec 01, 2023 at 12:27:40PM +0000, Alice Ryhl wrote:
> >>
> >> You can import it with a use statement. For example:
> >>
> >> use kernel::file::flags::O_RDONLY;
> >> // use as O_RDONLY
> >
> > That's good to hear,
Except that the examples here seem to imply you can't import
all of the values without listing them all.
From what I've seen of the rust patches the language seems
to have a lower SNR than ADA or VHDL.
Too much syntatic 'goop' makes it difficult to see what code
is actually doing.
....
> Alternatively if we end up with multiple flags modules you can do this
> (the sixth option from Alice):
>
> use kernel::file::flags as file_flags;
> use kernel::foo::flags as foo_flags;
>
> // usage:
>
> file_flags::O_RDONLY
>
> foo_flags::O_RDONLY
That looks useful for the 'obfuscated rust' competition.
Consider:
use kernel::file::flags as foo_flags;
use kernel::foo::flags as file_flags;
It's probably fortunate that I' old enough retire before anyone forces
me to write any of this stuff :-)
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists