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.7 required=5.0 tests=AXB_XMAILER_MIMEOLE_OL_024C2, BAYES_00,MAILING_LIST_MULTI autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3a3dffa82925efee X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!usenet-fr.net!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: "Andrew Carroll" Newsgroups: comp.lang.ada Subject: Advantages Date: Mon, 28 Jun 2004 00:23:34 -0600 Organization: Cuivre, Argent, Or Message-ID: References: <20040628005515.0A1E74C4160@lovelace.ada-france.org> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: melchior.cuivre.fr.eu.org 1088402870 41987 212.85.156.195 (28 Jun 2004 06:07:50 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Mon, 28 Jun 2004 06:07:50 +0000 (UTC) To: Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: g2news1.google.com comp.lang.ada:1961 Date: 2004-06-28T00:23:34-06:00 > ------------------------------ > Message: 3 > From: "Nick Roberts" > 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 > 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 > Subject: Re: Advantages > > "Nick Roberts" 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" > 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!!!!