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:a24:4748:: with SMTP id t69mr1820937itb.10.1552484646082; Wed, 13 Mar 2019 06:44:06 -0700 (PDT) X-Received: by 2002:a05:6830:1458:: with SMTP id w24mr28173227otp.303.1552484645690; Wed, 13 Mar 2019 06:44:05 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!82no113643itk.0!news-out.google.com!y88ni126ita.0!nntp.google.com!r6no16845ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 13 Mar 2019 06:44:05 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=208.114.128.98; posting-account=MRPdDAoAAADUJmZVjnYaoafXFMadSeY1 NNTP-Posting-Host: 208.114.128.98 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Intervention needed? From: Olivier Henley Injection-Date: Wed, 13 Mar 2019 13:44:06 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:55863 Date: 2019-03-13T06:44:05-07:00 List-Id: On Wednesday, March 13, 2019 at 5:10:31 AM UTC-4, Maciej Sobczak wrote: > So, seriously - what's wrong with pointers in Rust? >From that excerpt by Oliver Scherer (Rust compiler contributor), it looks l= ike the ownership aspect that comes with them is a real improvement: "The two (obviously not a good amount of datapoints) large scale refactorin= gs in Ada software that I've been part of have resulted in horrible hacks w= here people just spammed protected and pragma everywhere to get stuff worki= ng and bug free. The protected injections are because it's nearly impossibl= e to figure out which things are accessed by multiple tasks without SPARK a= nd you end up with undefined behaviour if you accidentally have a shared ac= cess to an unprotected memory location. The pragmas were reconfiguring thin= gs like stack size or disabling compiler warnings without actually thinking= about what these changes meant. Refactorings in Rust on the other hand are (compile-time) guaranteed to be = free of race conditions, no matter how crazy you move stuff around or creat= e new parallelism. Additionally the ownership concept lead to many librarie= s typestate encoding their API which makes misusing them a near impossibili= ty (at compile-time) while Ada mainly catches those misuses at runtime via = exceptions." > My personal argument would be that their syntax and learning curve behind= the involved idioms are making the code very difficult to comprehend. But = this is the rational argument that was not mentioned here Right. I did mention the equivalent on the Rust forum:=20 "I fail to understand how the requiring of such [implicit knowledge](http:/= /squidarth.com/rc/rust/2018/05/31/rust-borrowing-and-ownership.html) to ach= ieve so little is desirable in any production environment?"=20 Personally I plan to read the 'The Book' to see if those idioms are really = 'hinderers' but also to know more about Rust.