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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b8b8a54001adc4d2 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Possible Ada deficiency? Date: Tue, 11 Jan 2005 10:48:12 +0100 Organization: cbb software GmbH Message-ID: References: <1104516913.718856.94090@z14g2000cwz.googlegroups.com> <16jm4u4b7j5bh.5r4falzh3k6a$.dlg@40tude.net> <9ls4dpw9xkri$.1t4b3d8zglukq.dlg@40tude.net> <2106909.XdsyxhICSC@jellix.jlfencey.com> Reply-To: mailbox@dmitry-kazakov.de Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: individual.net dsl0lxTW5FLeiIV+9g61xAVPBMnNfZcarFqmFllru5sJ4LO7o= User-Agent: 40tude_Dialog/2.0.12.1 Xref: g2news1.google.com comp.lang.ada:7636 Date: 2005-01-11T10:48:12+01:00 List-Id: On Tue, 11 Jan 2005 07:24:10 +0000, Vinzent 'Gadget' Hoefler wrote: > Dmitry A. Kazakov wrote: > >> On 10 Jan 2005 18:58:12 +0100, Pascal Obry wrote: >> >>> Duncan Sands writes: >>> >>>>> Another thing *I* would remove from the language is pragmas! At >>>>> least I would not allow them anywhere except bodies. >>>> >>>> What about pragma Inline? >> >> I would leave all optimization issues to the compiler. > > Hmm. Then: What about pragma Volatile? pragma Atomic? Atomic and volatile are not about optimization. They describe a contract. It is wrong to use pragmas for them. Maybe in C++, which does not deal with concurrency it would be appropriate, but definitely not in Ada. It is clear why these pragmas appeared. But it is also clear how they could disappear. With full ADT an "atomic Integer" will implement abstract protected object. No need in any pragmas! > Or all these interesting ones from Annexes D, E & H? It depends on each concrete case. But the principle is simple, there should be no pragmas influencing contracts. So they need not appear in specifications. Therefore they should be forbidden there. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de