"Yannick Duch�ne (Hibou57)" wrote in message news:op.vqhzfuuyule2fv@garhos... >Le Tue, 25 Jan 2011 02:36:27 +0100, Randy Brukardt >a �crit: >> Can't answer that, but we did consider adding such a feature to Ada 2012. >> Eventually we decided on a more general purpose user-defined >> dereferencing >> capability instead. >You mean this is already part of the actual or next to come Ada 2012 ? We expect it to be, although it isn't finished and it will have to be finished by the end of this month (as with all work on Ada 2012) in order to be included. See AI05-0139-2. The "Reference" aspect combines with access discriminants and controlled types to give effectively a user-defined dereferencing mechanism. The primary problem with user-defined dereferencing is controlling the lifetime of the returned access value -- we don't want it copied outside of the control of the underlying container abstraction. In addition, it is important that the container be able to get control twice: once when the dereference is created, and once when it is destroyed. The latter is needed in cases of persistence or other kinds of locking. (In the case of persistence, the object must be available in memory so long as a reference to it is valid, but it can be pushed back to the backing store once the references are all gone. Another example is a the tampering check of the Ada containers, which prevent the object of the reference from disappearing while the reference exists.) It turns out that the mechanism needed already exists in the language, in the form of access discriminants. In addition, the object containing the access discriminant can be controlled, thus giving control upon destruction of the object (and the reference). So the only problem is the terrible syntax of such a dereference. The Reference aspect allows us to eliminate that. Combined with the indexing aspect, you'll be able to write something like: Foo(1).Bar := 10; For a vector container Foo whose elements are a record type with a component Bar. And even: Text_Map ("Ada").Count := 1; For an indefinite map. Randy.