comp.lang.ada
 help / color / mirror / Atom feed
From: "Andrew Carroll" <andrew@carroll-tech.net>
To: <comp.lang.ada@ada-france.org>
Subject: Advantages
Date: Mon, 28 Jun 2004 00:23:34 -0600
Date: 2004-06-28T00:23:34-06:00	[thread overview]
Message-ID: <mailman.170.1088402869.391.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: 20040628005515.0A1E74C4160@lovelace.ada-france.org

> ------------------------------
> Message: 3
> From: "Nick Roberts" <nick.roberts@acm.org>
> Subject: Re: Advantages
>
[snip]
> Because the use of OS primitives such as semaphores is hidden from the
user
> by Ada, many of the mistakes that would be easy to make in the C code
are
> either impossible -- for example, we cannot omit a call to set or
reset a
> semaphore, since Ada does these for us invisibly -- or caught by the
> compiler and reported to us in an obvious way -- for example, if we
tried to
> use 'Inner_R' in an expression in task A or B, the compiler would
complain
> that Inner_R is not visible at that point (because it is private to
Prot_R).
>
[snip]
> --
> Nick Roberts
>

Ohhhhh, that IS a BIG plus!!  Two years ago I took an Operating Systems
course and we discussed semaphores but we only discussed it with respect
to the C programming language.  I understand all that you said.  Great
demonstration Thanks!!


> ------------------------------
> Message: 5
> From: Jim Rogers <jimmaureenrogers@worldnet.att.net>
> Subject: Re: Advantages
>
> Ada concurrency features are generally at a higher abstraction level
than
> for other languages. The higher abstraction level has many benefits.
> The higher abstraction level allows a particular target implementation
to
> be transparent to the Ada programmer, providing a high level of source
> code portability. In languages such as C or C++ you must choose the
> appropriate low level threading library, such as pthreads or
winthreads.
>
> The Ada concurrency model includes some very sophisticated concepts
such
> as read/write locks, monitors, condition variables, queued calls
> involving condition variables, programmer-defined queuing policies,
> and conditional suspension of calls waiting in a queue (under the
> control of the calling task).
>
> All these features can be implemented using the threading facilities
> of an underlying OS, or they can be implemented without an OS. The
> difference to the programmer is his choice of a compiler. Some Ada
> compilers are specifically designed to produce code for a specific
> OS while others are designed to produce code for bare hardware, with
> no underlying OS.
[snip]
>
> Jim Rogers
>
So you're saying that Ada moves as much of the target implementation
peculiarities to the compiler level to achieve the abstraction?
Would it be safe to say then that Ada in general depends heavily on the
compiler to catch implementation mistakes?


> ------------------------------
> Message: 9
> From: Pascal Obry <pascal@obry.org>
> Subject: Re: Advantages
>
> "Nick Roberts" <nick.roberts@acm.org> writes:
>
> > Really, one could write a big book about concurrent programming in
Ada.
> > Hehe, in fact I'm sure somebody has! I'm sorry, I can't recall the
details,
> > but I'm sure someone else will oblige.
>
> Concurrency in Ada. Alan Burns and Andy Wellings.
> Cambridge University Press
> ISBN 0-521-41471-7
>
> The best book on concurrent programming I would say.
>
> Pascal.
>
Thanks, I'll be looking this one up on Amazon.


> ------------------------------
> Message: 10
> From: "Robert I. Eachus" <rieachus@comcast.net>
> Subject: Re: Advantages
[snip]
> for S.  This is not hard to write in Ada, but the implicit ordering of
> with clauses will make it impossible ... any
> calling sequence that violates the rule will mean that the compiler
will
> reject the program.

VERY NICE!!  I'm guessing that Ada does this type of checking in general
and not just for the concurrency model?

>
>                                            Robert I. Eachus
>

I think you have shown me another side of Ada.  Or at least given me a
glimpse of another side of Ada.  It helps so much to have an example!!!
Do the new "limited with" and "synchronized" keywords discussed for
Ada200Y affect the information you have provided?

Thanks again!!!!






       reply	other threads:[~2004-06-28  6:23 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040628005515.0A1E74C4160@lovelace.ada-france.org>
2004-06-28  6:23 ` Andrew Carroll [this message]
2004-06-28 14:44   ` Advantages Jacob Sparre Andersen
2004-07-04 18:11   ` Advantages Robert I. Eachus
2004-06-28  9:52 Advantages Lionel.DRAGHI
  -- strict thread matches above, loose matches on Subject: below --
2004-06-27  7:04 Advantages Andrew Carroll
2004-06-27 15:16 ` Advantages Nick Roberts
2004-06-27 21:22   ` Advantages Pascal Obry
2004-06-28  0:51   ` Advantages Robert I. Eachus
2004-06-28  1:59     ` Advantages Brian May
2004-06-29  0:24       ` Advantages Randy Brukardt
2004-06-29  3:32         ` Advantages Hyman Rosen
2004-06-29 18:41           ` Advantages Randy Brukardt
2004-07-02  0:49             ` Advantages Brian May
2004-07-02  1:31               ` Advantages Jeffrey Carter
2004-07-02  9:13               ` Advantages Dmitry A. Kazakov
2004-07-02 12:27               ` Advantages Marin David Condic
2004-07-04 17:42       ` Advantages Robert I. Eachus
2004-06-28 12:08   ` Advantages Marin David Condic
2004-06-27 18:32 ` Advantages Jim Rogers
2004-06-26  6:28 Advantages Andrew Carroll
2004-06-25 19:41 Advantages Andrew Carroll
     [not found] <20040624170516.B4DFC4C4110@lovelace.ada-france.org>
2004-06-25 12:24 ` Advantages Andrew Carroll
2004-06-25 12:22   ` Advantages Peter Amey
2004-06-26 20:43   ` Advantages Marin David Condic
replies disabled

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