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=-2.9 required=3.0 tests=BAYES_00,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!news.szaf.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Ada versus Pascal Date: Fri, 22 Oct 2021 11:57:17 +0300 Organization: Tidorum Ltd Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net eOhFlIekAy2C9D3AasdA5Qp1SJJwp7ULzeBEC+4ugtu8VX3+Df Cancel-Lock: sha1:+jCT4LUGxPXG1Ws3RNaBKI6DXvw= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 In-Reply-To: Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:63050 List-Id: On 2021-10-22 6:29, 711 Spooky Mart wrote: > The little snippets of Ada code I've seen look _alot_ like Pascal. Yes. Pascal syntax had a lot of influence on Ada syntax. But, as others have said, (current) Ada has a lot more features than (original) Pascal. Very roughly speaking, and off the cuff, Ada has evolved as follows, which also gives you a list of the main things to learn, in addition to the Pascal base: - Ada 83: Pascal + much improved type system + modules (packages) + exception handling + generic programming + concurrency (tasks) - Ada 95: added modular (unsigned) integer types, object-oriented programming (classes = tagged types), package hierarchies (child packages), and asynchronous inter-task communication (protected objects) - Ada 2005: added Java-like interface types (limited multiple inheritance), a standard container library, and further standard libraries - Ada 2012: added support for program proof and logical run-time checks (preconditions, postconditions, type predicates), more forms of expressions (if expressions, case expressions, quantified expressions), and more standard libraries. - Ada 2022 (upcoming): adds fine-grained parallel execution, extends the ability to do static (compile-time) computations, adds library packages for arbitrary-precision and arbitrary-range integer and real arithmetic ("bignums"), and makes lots of sundry improvements. > What degree of learning curve is there to learn Ada, coming from a > Pascal background? What kind of rough timeframes to get comfortable with > programming without always looking to the manuals? As you can see from the list above, there is quite a lot to learn before you know _all_ of Ada. A Pascal-like subset should not be hard to learn, and if you learn the rest of the features in more or less the same order as they were added to Ada, you will pass from one consistent, working language subset to a larger such subset at each step. The only point where I suggest to learn features in a different order is in inter-task communication: asynchronous communication via protected objects is much easier than was the original, synchronous rendez-vous method in Ada 83 (but which is of course still supported). > Where is the best starting point for a Pascal programmer to get up and > running with Ada? I think this depends a lot on how you like to learn - by reading technical text (manuals) or by experimentation. I'm a "read the manual" type (I learned Ada from the Ada 83 Reference Manual) so perhaps I would start with the Ada Wikibook at https://en.m.wikibooks.org/wiki/Ada_Programming, which extends up to the 2012 Ada standard (or so it claims, I haven't really read it, but I've heard good reports of it). Perhaps you could take one of your smaller Pascal programs and translate it to Ada as a first step? As the next step, you could divide that program into packages, then add exception handling. And then take a new problem and write an Ada program from scratch. Ask for help here, or in some other Ada forum, whenever in doubt about something.