<div dir="auto">I think there are a lot of languages which promise this. The question is whether any of them will get the critical mass to ensure that we have a steady supply of programmers who know the language. Imagine if we'd decided to use Haskell, Erlang or Ada (languages I was taught in university which no longer have significant programming communities).<div dir="auto"><br></div><div dir="auto">Rust seems to have the momentum. More so than Go or any other new language in recent years.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun., Jun. 19, 2022, 15:08 Geert Uytterhoeven, <<a href="mailto:geert@linux-m68k.org">geert@linux-m68k.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Laurent,<br>
<br>
On Sun, Jun 19, 2022 at 3:49 PM Laurent Pinchart<br>
<<a href="mailto:laurent.pinchart@ideasonboard.com" target="_blank" rel="noreferrer">laurent.pinchart@ideasonboard.com</a>> wrote:<br>
> On Sun, Jun 19, 2022 at 08:56:46AM -0400, James Bottomley wrote:<br>
> > On Sun, 2022-06-19 at 13:04 +0300, Laurent Pinchart wrote:<br>
> > > On Sat, Jun 18, 2022 at 11:13:59PM -0700, Christoph Hellwig wrote:<br>
> > > > On Sat, Jun 18, 2022 at 11:42:07PM +0300, Laurent Pinchart wrote:<br>
> > > > > All previous topics but this one are technical. To restore the<br>
> > > > > balance a bit (and also because I believe it's important to the<br>
> > > > > success of this project :-)), I'd like to also discuss the impact<br>
> > > > > on the kernel maintenance at large, beyond just the maintainers<br>
> > > > > who opt in to be early adopters of rust in their subsystem.<br>
> > > ><br>
> > > > Yes.  That is I think the most important point.<br>
> > > ><br>
> > > > I've played around with rust a bit for userspace project, and there<br>
> > > > is things I like a lot like strict type safety and the ownership<br>
> > > > model, and things I detest like verbose and unlogic syntax, the<br>
> > > > cargo cult of vendoring libraries instead of a sane shared library<br>
> > > > and versioning model (althought that should be largerly irrelevant<br>
> > > > for the kernel), and compared to many other languages it seems<br>
> > > > overall rather sane.<br>
> ><br>
> > This is more or less my assessment from playing with rust as well.<br>
> ><br>
> > > > But I'm really worried about the impact on the kernel, as interface<br>
> > > > between languages are a real pain, and so far I'm not convinced at<br>
> > > > all that this pain is worth the gain, even if that could change in<br>
> > > > the future.<br>
> > ><br>
> > > One point I'd like to explicitly address, as it seems to be very<br>
> > > relevant to me when it comes to whether or not the pain is worth the<br>
> > > gain, is how we'll deal with the fact that the rust compiler will<br>
> > > tell a non-negligible [*] part of the kernel developers that they<br>
> > > don't have the skills to write kernel code. Will we have a credible<br>
> > > option to offer there to help people improve their skills set, and<br>
> > > how will we deal with the fact that some people will be left on the<br>
> > > side of the road ? Or would we acknowledge what may be the elephant<br>
> > > in the room that this would actually be a good thing for the kernel<br>
> > > code quality ? What about the impact on a community that is already<br>
> > > overworked and prone to burn-out ?<br>
> > ><br>
> > > [*] I have no way to quantify this at the moment, maybe I'm overly<br>
> > > pessimistic, and the number will likely vary depending on areas,<br>
> > > probably impacting BSPs differently than mainline.<br>
> ><br>
> > I don't think that's a huge concern.  After all rust isn't going to<br>
> > penetrate every subsystem all at once ... and realistically it will<br>
> > only penetrate some subsystems if there's the ability to review it.<br>
> ><br>
> > I really doubt anyone at the maintainer or reviewer level of the kernel<br>
> > doesn't have the ability to learn rust (now whether they have the<br>
> > desire to is quite another matter) and I'd be surprised if we can find<br>
> > any kernel developer who only speaks C.  I think the biggest problem<br>
> > with rust is that there's definitely an anti-C bias in the language.<br>
> > What I mean by that is if you look at Java they chose to be as close to<br>
> > C where possible to make the language easier to learn.  Rust seems to<br>
> > have taken the opposite view and picked a lot of things which could<br>
> > have been C like (typing, function calls, returns, mutability, etc.)<br>
> > and done them differently just because they wanted to be different from<br>
> > C.  That does cause issues for C people because you tend to trip over<br>
> > the anti-C biases in the language and are constantly having to look the<br>
> > basic syntax up.  This really increases the learning curve going from C<br>
> > to rust, which gets annoying very fast, but it's not insurmountable.<br>
><br>
> Time to invent a C-like version of rust ? :-) Jokes aside, as far as I<br>
> understand the syntax is different from C because it was inspired by<br>
> other languages, not out of a desire to be anti-C. I could be wrong<br>
> though, and it doesn't really matter anyway, I doubt there's anything we<br>
> could do there.<br>
<br>
When reading "things which could have been C like", I had the exact<br>
same thought ;-)<br>
<br>
In the past, many new paradigms were implemented in a variety of new<br>
languages, usually inspired by other languages (e.g. some looked like<br>
C, others like Pascal).<br>
<br>
At the risk of sounding too procrastinating (perfect is the enemy<br>
of good, and see James' thread about becoming too fearful...),<br>
perhaps it is wise to question if Rust arrived too soon, and a more<br>
C-like language implementing the same safety paradigms is just around<br>
the corner, or already in its infancy?<br>
<br>
Gr{oetje,eeting}s,<br>
<br>
                        Geert<br>
<br>
--<br>
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- <a href="mailto:geert@linux-m68k.org" target="_blank" rel="noreferrer">geert@linux-m68k.org</a><br>
<br>
In personal conversations with technical people, I call myself a hacker. But<br>
when I'm talking to journalists I just say "programmer" or something like that.<br>
                                -- Linus Torvalds<br>
<br>
</blockquote></div>