Date: Thu, 05 Sep 2024 21:45:29 +0200 From: Steffen Nurpmeso <steffen@sdaoden.eu> To: Alan Somers <asomers@freebsd.org> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: The Case for Rust (in any system) Message-ID: <20240905194529.3szOViVM@steffen%sdaoden.eu> In-Reply-To: <CAOtMX2iCNX5OkdeghnbmcMrO0UYWwm4zfxFSZGznOznu%2Bmh5rA@mail.gmail.com> References: <CAOtMX2iCNX5OkdeghnbmcMrO0UYWwm4zfxFSZGznOznu%2Bmh5rA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Alan Somers wrote in <CAOtMX2iCNX5OkdeghnbmcMrO0UYWwm4zfxFSZGznOznu+mh5rA@mail.gmail.com>: |By now I expect that most of you have seen the long list of new |security advisories that just came out. Strikingly, all were the |result of memory handling errors. And none of them wouldn't have |happened if their respective programs had been written in a |memory-safe language. | |In fact, of all the C bug fixes that I've been involved with (as |either author or reviewer) since May, about three quarters could've |been avoided just by using a better language. | |The real takeaway here is that C is no longer sufficient for writing |high quality code in the 2020s. Everyone needs to adapt their tools. I *totally* speak against this. Quite the opposite i claim that C was safe already fifty years ago, it is just that the occasional one does not realize it. *Nothing* prevents you from using a string object instead of direct memory accesses, a vector object instead of arrays managed via realloc(), and all that. *Nothing*. If *you* do not do that that is your fault and you are a bad programmer; moreover, you should not be allowed to vote in a democratic environment (surely you do not read all the magazines and newspapers, and watch or hear to policital emissions, in order to build yourself a *real* opinion), be enabled to drive a car, and what else not. Ie, please live in a managed environment if you want to. Let me fight for a relatively free language which allows, but does not mandate. I agree that method-on-object is much nicer than pointer-on-function, ie a C++ "str.trim().squeeze().c_str()" is "better" than whatever you do in C. I have no voice anyway and no longer post on this bikeshed midsummer hole stuff. Here are subjects dying, that moves me enough. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20240905194529.3szOViVM>