comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Ada versus Pascal
Date: Fri, 22 Oct 2021 11:57:17 +0300	[thread overview]
Message-ID: <itfcneFalfnU1@mid.individual.net> (raw)
In-Reply-To: <sktb3o$dn1$1@gioia.aioe.org>

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.

  parent reply	other threads:[~2021-10-22  8:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22  3:29 Ada versus Pascal 711 Spooky Mart
2021-10-22  6:18 ` ldries46
2021-10-22  9:59   ` 711 Spooky Mart
2021-10-22 15:12     ` Niklas Holsti
2021-10-22 15:47       ` Dmitry A. Kazakov
2021-10-23  7:13       ` ldries46
2021-10-23 14:08       ` Simon Wright
2021-10-22  6:40 ` Paul Rubin
2021-10-22  8:57 ` Niklas Holsti [this message]
2021-10-22 11:49 ` Jeffrey R.Carter
2021-10-22 17:05 ` Dennis Lee Bieber
2021-10-23  0:29   ` Paul Rubin
2021-10-23  1:17     ` Randy Brukardt
2021-10-23 17:24     ` Dennis Lee Bieber
2021-10-24  7:04       ` J-P. Rosen
2021-10-22 20:00 ` Gautier write-only address
2021-10-24  4:33 ` Jerry
2021-10-24  6:32   ` ldries46
2021-10-24 16:51   ` Gautier write-only address
2021-10-24 23:24     ` 711 Spooky Mart
2021-10-25  8:23       ` Niklas Holsti
2021-10-25  8:40         ` Luke A. Guest
2021-10-25 13:34           ` Luke A. Guest
replies disabled

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