Date: Wed, 04 Sep 2024 13:57:34 +0000 From: fvalasiad <fvalasiad@proton.me> To: Anthony Pankov <anthony.pankov@yahoo.com> Cc: Rob Norris <robn@despairlabs.com>, freebsd-hackers@freebsd.org Subject: Re: The Case for Rust (in the base system) Message-ID: <sf1UAcr0V7jiNzztq5nmIK2NdrBF3jQuh13VN79irTRyX915_he8YXYNOSy_-sxGlpMoSP6aZ9VktG7ERS53N-u8tYQAtIBiQxnl0K9Z8ls=@proton.me> In-Reply-To: <27925916.20240904133623@yahoo.com> References: <vdmg5zocd6wqcwc2bvzvzqn4bii2pwdc2r4mgnisukfkboj6nf@f7lv5quu4fjx> <CANCZdfoHjYUDeNo78qk6BjHfRgwgDbuuVjD5D9uG6tyCk81-ew@mail.gmail.com> <Zq69w1D7aYRiNdPx@kib.kiev.ua> <CAFYkXjmURZwBbrFL=uWT%2BDZ6h_qjjpoucxW4-3CpDhKn3XX2gg@mail.gmail.com> <jbuwu5qby7gb7abym3msutmojx26qhwcgyyb2cb6nfnf2w4a6h@otor5sawmss5> <dHVxEgS5MbvPceHSJF-G42LSk22NXsjKKwPzFagCTDNsKO4zgQpZKjteuGEAdO2ikPVIkP-3x6r2I1caTlM2YQrH3vjrWzgtRUVFtwsObOA=@proton.me> <202409031131.483BVdax004602@critter.freebsd.dk> <ZtgUQf0Ao7L9iQTD@crayon> <27925916.20240904133623@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Being one of the young C developers you are referring to lain, right out of= uni from some southern european country, allow me to share my experience. The introductory class that teaches basic programming is done in C. Basic c= oncepts like if statements, loops, structs, up to malloc(3) and free(3). The backlog of students for that class is the biggest in the entire univers= ity, amounting to 700 people like 2 years ago, mind you the uni takes about= 100 students per year. Additionally, in 3rd and 4th year where students pick fields of study, the = one I followed about hardware had barely 6 students in my year. Funnily, we= all found a job in the field before we even left uni. Most students, if not because of inadequacy, seem to not choose C. I also haven't seem to met anyone entering the Rust cult either, they sure = exist but they are also a minority. While this is alarming, I don't find it impossible for this to come back ar= ound if demand rises in parallel with the paycheck offered for the job. Mon= ey is a great motivator especially if you are struggling to make ends meet. Given how the funding situation goes with FOSS projects though, things aren= 't great as you all know! Again, that's a completely biased experience cherry picked from a single co= mputer science department in some small country, so take this with a mouthf= ul of salt. Fotis. =20 On Wednesday, September 4th, 2024 at 1:34 PM, Anthony Pankov <anthony.panko= v@yahoo.com> wrote: > Hello Rob, >=20 > > What I actually want though is high-quality tools to make the kind of > > problems I need to solve easier for my puny human brain to manage. Rust > > is an approach to solving some of these kinds of problems. Other > > approaches exist, have existed, and will exist in the future. >=20 >=20 > I'm interested in your opinion. Do the tools like PROMELA-SPIN used for s= ome (critical) part of a C-sourced project will give more correctness and l= ess error prone compared to rewriting project in Rust? > Is there an actual possibility to make such a tools integral part of proj= ect? >=20 > Wednesday, September 4, 2024, 11:03:13 AM, you wrote: >=20 > > On 03.09.2024 11:31, Poul-Henning Kamp wrote: > >=20 > > > But first and foremost: There has to be a good enough reason. >=20 > > This is a near-enough hook for me to hitch a couple of thoughts on to := ) >=20 > > I work on ZFS, primarily on Linux with slowly increasing amounts on > > FreeBSD too. By a long way, the kind of work that is the slowest and > > most complicated is around complex locking sequences across multiple > > threads. In most of these, getting it wrong leads to some kind of data > > corruption that is usually impossible to track down. >=20 > > The appeal of Rust for me, as for many, is that there are ways to encod= e > > those kind of sequencing rules into the type system so that the compile= r > > can tell you where you got it wrong. But, I don't actually want Rust as > > such. I like it a lot, I've written useful programs in Rust over the > > last decade, and I'd be perfectly happy to use it in kernel and > > filesystem development if it was available. >=20 > > What I actually want though is high-quality tools to make the kind of > > problems I need to solve easier for my puny human brain to manage. Rust > > is an approach to solving some of these kinds of problems. Other > > approaches exist, have existed, and will exist in the future. >=20 > > This is mostly aimed at the "C is totally fine" crowd. I like C, and I'= m > > pretty good at it, but it absolutely not good enough for many kinds of > > software. Frankly, I find "just get better at C" to be the most > > infuratingly facile "argument" against Rust. >=20 > > (And I would love to get better at C. If substantially better C tools > > are out there (on whatever axis you like to measure that on), then > > they're either not visible to me, or they're not usable or > > well-integrated enough to be in my standard kit). >=20 > > There's plenty of plausible reasons not to include Rust in the base > > system, many of them being discussed on this list, and I'm learning a > > lot reading along. Just please don't pretend the problems it's trying t= o > > solve aren't real. >=20 > > Cheers, > > Rob. >=20 > > -- > > Rob Norris | robn.au | robn@despairlabs.com >=20 > > Working on OpenZFS, because there's a lot of data out there and it'd be > > nice not to lose any of it. >=20 >=20 >=20 >=20 > -- > Best regards, > Anthony Pankov
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?sf1UAcr0V7jiNzztq5nmIK2NdrBF3jQuh13VN79irTRyX915_he8YXYNOSy_-sxGlpMoSP6aZ9VktG7ERS53N-u8tYQAtIBiQxnl0K9Z8ls=>