comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: GNAT for MS Visual Studio
Date: Sat, 6 Oct 2007 22:19:43 -0500
Date: 2007-10-06T22:19:43-05:00	[thread overview]
Message-ID: <fe9j33$968$1@jacob-sparre.dk> (raw)
In-Reply-To: 4707A3D0.3070702@obry.net

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2526 bytes --]

"Pascal Obry" <pascal@obry.net> wrote in message
news:4707A3D0.3070702@obry.net...
> Matthew Heaney a �crit :
> > No, this is incorrect.  The container keeps track of nested calls
> > (e.g. Query_Element, Iterate) using a count, in order to prevent
> > container misuse (e.g. deleting the element while it's being
> > queried).  So even though the logical view of the container doesn't
> > change, then physical view does change, and so the standard requires
> > that multiple tasks accessing a container must be properly
> > synchronized, even when the access is read-only.
>
> Outch! Big mistake to require this to me :(
>
> Maybe something like "Don't let best be enemy of good" !
>
> That's probably the first time I'm very surprised and annoy by an Ada
> design decision. It seems that there is good reasons... but frankly not
> something really user friendly to me :(

If you want dangerously unsafe containers, you are welcome to write them
yourself. But they don't belong in the standard (surely not as the sole
example of containers).

For me, the most important advantage of the containers is that they can be
made safe (in the absence of unsafe operations on an object containing a
container). It's not necessary to have any operations that fail to detect
dangling cursors and the like -- this is a big advantage over directly using
access types to create a list or vector. But such implementations require
housekeeping even for reading.

Similarly, the case that Matt mentioned would make it trivial to have
undetected errors that could cause serious trouble down the road. We were
explicitly asked to minimize the cases of erroneous execution (that is,
totally unpredictable result); it's quite possible that the containers would
have been rejected altogether if we had not followed that recommendation.

The implementations that I've been planning to use for the containers would
require locking in order to provide any task safety -- meaning that I would
have had to either give up on safety or performance -- not a good trade-off.

The containers having different rules than those for *all* other Ada
libraries (including things like matrix operations) would be weird, to say
the least.

Anyway, the point is that a lot of thought and debate went into this
decision. We also started a project to create a set of protected containers
for multitasking use (not much is happening with it, though, as its priority
is lower than the ASIS update and fixing bugs in the standard).

                      Randy.





  parent reply	other threads:[~2007-10-07  3:19 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-06  2:20 GNAT for MS Visual Studio William J Thomas
2007-09-06  7:44 ` anon
2007-09-06  8:49   ` Rob Veenker
2007-09-06 11:12     ` William J Thomas
2007-09-11  3:15 ` Jeffrey Creem
2007-09-20  0:00 ` William J Thomas
2007-09-21  0:46   ` Randy Brukardt
2007-09-21  3:27     ` William J Thomas
2007-09-21 17:31       ` Markus E L
2007-09-21 18:13       ` Dmitry A. Kazakov
2007-09-22  1:42         ` Randy Brukardt
2007-09-22  1:59       ` Randy Brukardt
2007-09-22  5:19         ` Simon Wright
2007-09-22 14:42         ` Steve
2007-09-24  8:14           ` Jean-Pierre Rosen
2007-09-25  1:44             ` Steve
2007-09-25  6:41               ` Jean-Pierre Rosen
2007-09-25  8:29               ` Michael Bode
2007-09-25 18:00                 ` Jeffrey R. Carter
2007-09-25 18:31                   ` Michael Bode
2007-09-25 11:20               ` Markus E L
2007-09-26  2:23                 ` Steve
2007-09-26 12:21                   ` Markus E L
2007-09-28  0:49                     ` Randy Brukardt
2007-09-28  2:43                     ` Steve
2007-09-28  9:36                       ` Markus E L
2007-09-29 15:59                         ` Michael Bode
2007-09-29 16:50                           ` Markus E L
2007-09-26  6:58                 ` Ole-Hjalmar Kristensen
2007-09-26 13:35                   ` Steve
2007-09-26 14:06                     ` Markus E L
2007-09-27 18:26                       ` Michael Bode
2007-09-27 20:18                         ` Markus E L
2007-09-28  6:45                         ` Jean-Pierre Rosen
2007-09-29  9:18                           ` michael bode
2007-09-28  2:29                       ` Steve
2007-09-28  9:23                         ` Markus E L
2007-09-30 14:50                           ` Steve
2007-10-02  3:50                             ` Randy Brukardt
2007-10-02 11:06                               ` Peter C. Chapin
2007-10-02 20:38                               ` Maciej Sobczak
2007-10-02 20:45                                 ` Pascal Obry
2007-10-03 19:23                                   ` Maciej Sobczak
2007-10-03 19:40                                     ` Pascal Obry
2007-10-03 20:08                                       ` Maciej Sobczak
2007-10-04 20:18                                         ` Maciej Sobczak
2007-10-04 20:21                                           ` Pascal Obry
2007-10-05 13:25                                             ` Maciej Sobczak
2007-10-06 10:50                                               ` concurrent access to containers (was: GNAT for MS Visual Studio) Georg Bauhaus
2007-10-05 20:15                                         ` GNAT for MS Visual Studio Simon Wright
2007-10-06 14:47                                       ` Matthew Heaney
2007-10-06 15:03                                         ` Pascal Obry
2007-10-06 16:03                                           ` Dmitry A. Kazakov
2007-10-06 17:07                                             ` Pascal Obry
2007-10-06 18:30                                               ` Dmitry A. Kazakov
2007-10-06 20:32                                                 ` Maciej Sobczak
2007-10-07  7:35                                                   ` Dmitry A. Kazakov
2007-10-07 21:30                                                     ` Maciej Sobczak
2007-10-08  7:50                                                       ` Dmitry A. Kazakov
2007-10-08 10:32                                                         ` Maciej Sobczak
2007-10-08 13:39                                                           ` Maciej Sobczak
2007-10-08 15:10                                                           ` Dmitry A. Kazakov
2007-10-08 20:40                                                             ` Maciej Sobczak
2007-10-09  8:32                                                               ` Dmitry A. Kazakov
2007-10-06 16:17                                           ` Matthew Heaney
2007-10-07  3:19                                           ` Randy Brukardt [this message]
2007-10-07  7:21                                             ` Pascal Obry
2007-10-07  7:49                                               ` Dmitry A. Kazakov
2007-10-07 16:41                                               ` Georg Bauhaus
2007-10-07 17:44                                               ` Simon Wright
2007-10-08  9:52                                                 ` Georg Bauhaus
2007-10-08 10:42                                                   ` Maciej Sobczak
2007-10-08 10:59                                                     ` Georg Bauhaus
2007-10-08 11:07                                                     ` Georg Bauhaus
2007-10-08 18:44                                                     ` Pascal Obry
2007-10-08 15:21                                                   ` Dmitry A. Kazakov
2007-10-08 18:28                                                 ` Pascal Obry
2007-10-07 21:48                                               ` Maciej Sobczak
2007-10-07 22:27                                                 ` Jeffrey R. Carter
2007-10-08 21:10                                                   ` Simon Wright
2007-10-09  1:53                                               ` Randy Brukardt
2007-10-09 21:01                                                 ` Simon Wright
2007-10-09 22:48                                                   ` Randy Brukardt
2007-10-10  0:21                                                     ` Jeffrey R. Carter
2007-10-10  4:57                                                   ` Simon Wright
2007-10-10  7:46                                                   ` Dmitry A. Kazakov
2007-10-03  5:20                                 ` Licensing again (was Re: GNAT for MS Visual Studio) Simon Wright
2007-10-03  2:03                               ` GNAT for MS Visual Studio Steve
2007-09-28 14:48                         ` Ed Falis
2007-09-29  2:32                           ` Steve
2007-09-29  6:53                             ` Vadim Godunko
2007-09-26 14:08                     ` Dmitry A. Kazakov
2007-09-25  2:39             ` Randy Brukardt
2007-09-25  8:40               ` Michael Bode
2007-09-25 11:28               ` Markus E L
2007-09-26 10:19               ` Pascal Obry
2007-09-26 13:00                 ` Michael Bode
2007-09-25  2:32           ` Randy Brukardt
2007-09-25  8:27             ` Stephen Leake
  -- strict thread matches above, loose matches on Subject: below --
2007-10-12 22:03 Anatoly Chernyshev
2007-10-13 20:25 ` Maciej Sobczak
2007-10-14 10:37   ` Simon Wright
2007-10-14 11:26     ` Markus E L
replies disabled

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