"Paul Rubin" wrote in message news:87wpximwv0.fsf@jester.gateway.sonic.net... > Björn Lundin writes: >>> Will look there, but those kinds of containers are more useful with GC. >> I think you are missing the point. Many things in Ada is done without >> allocating with 'new' And things that are, if OO, may inherit from >> Ada.Finalized, which gives a call to the objects' 'Finalize' method >> where deallcation - if necessary - can be done. So, the user does not >> fiddle with new/free. > > Right, that's sort of like C++ RAII. But GC gives you much more > flexibility. For example, maybe you want to allocate a container and > then pass it to another thread to work on it. What does this have to do with GC? When you pass a container to another task, it gets passed like any other parameter (by-reference in this case). There's no need to create an explicit access type. You need explicit access types in Ada only when you need to have a dynamically organized structure. And even some of those can be replaced by a container (lots of structures are really multi-way trees, so the tree container ought to work well for managing them). (There's also a few cases involving function returns where one might need them for efficiency reasons -- but worrying about that is premature optimization -- only introduce access types if you've demonstrated that the performance is insufficient.) Randy.