From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!aioe.org!Lx7EM+81f32E0bqku+QpCA.user.46.165.242.75.POSTED!not-for-mail From: "Luke A. Guest" Newsgroups: comp.lang.ada Subject: Re: Adacore joins with Ferrous Systems to support Rust Date: Thu, 3 Feb 2022 02:52:25 +0000 Organization: Aioe.org NNTP Server Message-ID: References: <87o83pzlvm.fsf@nightsong.com> <87bkzpyqx3.fsf@nightsong.com> <8735l0zo6j.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: gioia.aioe.org; logging-data="55252"; posting-host="Lx7EM+81f32E0bqku+QpCA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 X-Notice: Filtered by postfilter v. 0.9.2 Content-Language: en-GB Xref: reader02.eternal-september.org comp.lang.ada:63460 List-Id: On 03/02/2022 02:20, Paul Rubin wrote: > "Luke A. Guest" writes: >> [Ada vs Rust] Er, try learning both and you'll see? > > It's a big effort to become expert at either, let alone both. Basic or > superficial knowledge isn't helpful for such comparisons. I've read You don't need to learn both languages inside and out. You pick a project and implement it in both languages, that project has to be specific to what you are wanting to know about whether it's binding or tasking or whatever, Ultimately with Ada, you can get by knowing the Ada subset and the representation clauses and do most of what you need to do to compare to another language, obviously if you want to compare tasking, you need to go further. > "Ada Distilled" (Ada 95 version) but still have no clue understanding > most of the Ada discussions in this newsgroup, so there is a big gap > between basic and advanced knowledge of Ada. Learn the basic part, it's equivalent to Pascal with proper type ranges, Pascal only has subtypes iirc. That's the main part of the RM, no annexes, you can do without access and tagged/controlled types to start with. At uni, we didn't even touch on tagged types, but used controlled types, it is possible. >>> system really is more precise than Ada's in general, although it doesn't >> How is it? > > From what I've heard, Rust's type system is similar to Haskell's. > Haskell's type system can verify stuff just by typechecking, that might So it's no different than a C++ compiler checking against classes or a variant of C with strong typing? Still no ranges, subranges, ranges with holes in, etc. This is where the power is. > be doable in Ada using SPARK and maybe an external proof assistant, but > not with just types. Example: a red-black tree using Haskell GADT's > (Generalized Algebraic Data Types): > > https://www.reddit.com/r/haskell/comments/ti5il/redblack_trees_in_haskell_using_gadts_existential/ I don't know Haskell. Uni did a shit job at teaching functional, and logic languages. >> Ada's ahead in most things. > > Idk, I'd like to know more. I've never done anything serious in Ada and > nothing at all in Rust, but C++ seems a lot more fluid than Ada, and > Rust is supposed to compare well with C++. C++ of course is terrible in > terms of reliability but I'm only referring to the effort needed to bang > out a chunk of code. 1. What do you want to do? 2. Come into #Ada and get help. 3. Rewrite it in Rust. 4. Ada is comparable to C++. 4a. Ada > C++ in many ways.