comp.lang.ada
 help / color / mirror / Atom feed
From: Brad Moore <bmoore.ada@gmail.com>
Subject: Re: Microsoft is considering moving to Rust; potential opportunity for Ada2020
Date: Tue, 6 Aug 2019 10:49:47 -0700 (PDT)
Date: 2019-08-06T10:49:47-07:00	[thread overview]
Message-ID: <f8a1dfaa-c36a-4a66-b8fd-873888091ed3@googlegroups.com> (raw)
In-Reply-To: <qicboo$e34$1@dont-email.me>

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 <no.email@nospam.invalid> writes:
> > 
> >> Optikos <optikos@verizon.net> 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

  reply	other threads:[~2019-08-06 17:49 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-17 18:17 Microsoft is considering moving to Rust; potential opportunity for Ada2020 Optikos
2019-07-17 18:53 ` Maciej Sobczak
2019-07-17 22:59   ` Optikos
2019-07-17 23:35     ` Paul Rubin
2019-07-18  0:29       ` Optikos
2019-07-19 22:07       ` Simon Wright
2019-07-19 22:12         ` Paul Rubin
2019-08-06 17:01         ` Alejandro R. Mosteo
2019-08-06 17:49           ` Brad Moore [this message]
2019-08-07  9:09             ` Alejandro R. Mosteo
2019-08-08  2:13               ` Jere
2019-08-08  9:25                 ` Alejandro R. Mosteo
2019-08-06 17:56           ` Optikos
2019-08-06 20:04             ` Brad Moore
2019-08-07  9:07             ` Alejandro R. Mosteo
2019-07-25 18:40 ` G. B.
2019-07-26 14:12   ` Shark8
2019-08-15 15:39     ` Norman Worth
2019-10-01  8:04       ` Mehdi Saada
2019-10-02 17:11         ` Shark8
2019-07-26 14:11 ` Shark8
2019-07-27 20:03   ` Optikos
2019-07-27 20:17     ` Optikos
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox