From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a37:a8c2:: with SMTP id r185mr2967072qke.344.1565113787939; Tue, 06 Aug 2019 10:49:47 -0700 (PDT) X-Received: by 2002:a9d:6c46:: with SMTP id g6mr4492251otq.104.1565113787773; Tue, 06 Aug 2019 10:49:47 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!b26no6751792qtq.0!news-out.google.com!e17ni2774qtg.1!nntp.google.com!b26no6751783qtq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 6 Aug 2019 10:49:47 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=162.157.173.94; posting-account=lzqe5AoAAADHhp_gregSufVhvwu22fBS NNTP-Posting-Host: 162.157.173.94 References: <01e1fc91-a20e-4b48-a10e-57d3935cd06c@googlegroups.com> <0d4e46d4-c227-4d7a-aafa-44492c6e1d41@googlegroups.com> <871ryop74h.fsf@nightsong.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Microsoft is considering moving to Rust; potential opportunity for Ada2020 From: Brad Moore Injection-Date: Tue, 06 Aug 2019 17:49:47 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:56998 Date: 2019-08-06T10:49:47-07:00 List-Id: On Tuesday, August 6, 2019 at 11:01:14 AM UTC-6, Alejandro R. Mosteo wrote: > On 20/7/19 0:07, Simon Wright wrote: > > Paul Rubin writes: > > > >> Optikos writes: > >>> Yes, I also was wondering why Microsoft isn't fervently exploring > >>> adding a Rust-esque borrow checker to C# > >> > >> C# is garbage collected, I thought. No need for anything like a > >> borrow checker. > > > > GC is about safely disposing of memory that's no longer accessible from > > anywhere in the program. > > > > Borrow checking (AIUI) is about making sure that only one part of the > > program has write access to a particular piece of memory at once. > > Yes and no. If you check the first chapters in the Rust tutorial, heap > memory reclamation is also performed deterministically when the borrow > checker determines some memory has no more references left pointing to it. > > I've seen it described as static GC. I guess it's a side-effect of the > borrow checker; if you have to know how many mutable/immutable references > exist to a block of memory, you end knowing when none are left. > > That's my superficial understanding (haven't done any serious Rust). I'm > frankly impressed by the concept. It seems to be a real contribution to > the general landscape. Too bad the syntax gets ugly pretty quickly; I > wonder about long-term maintainability. > > Also, the particular interest of Microsoft in Rust is clear to me; it > precludes whole classes of memory errors that make for a big chunk of > security vulnerabilities. I believe it is also not just related to concurrency. For example, if you pass a pointer to an object into a function which deletes the object, the compiler will detect that use of that pointer after calling the function is not allowed. Brad