"rickduley" wrote in message news:8410fc60-9b8a-4f82-92fc-622a6bbe5931@i18g2000pro.googlegroups.com... > I don't quite see what you mean by: > >> But this does not means � access My_Type'Class � is better beceause it >> is � safer � (quotes, beceause the other way is not always not safe), >> as sometime, My_Access_Type is mandatory, depending on what the >> function have to do with the reference. > >If the function is called, and the actual parameter is valid, what >difference can it make what the function does with the data? He might be referring to the fact that the uses of the anonymous access parameter might raise Program_Error (as there is a dynamic accessibility check) while the named example is either going to be legal (and work properly) or illegal. My answer to the original question would have been: >Given: > > type My_Type is ...; >and > type My_Access_Type is access all My_Type'Class; > >what is the practical difference between: > > function My_Function (Thing : access My_Type'Class) return Positive; >and > function My_Function (Thing : My Access_Type) return Positive; The first has a runtime parameter passing overhead that the latter does not, and depending on how the parameter is used inside of the function, a significant possibility of raising Program_Error later. (Something Bob Duff calls a "tripping hazard"). This latter problem is especially bad as it is likely to be missed in unit testing (in that sense, it is similar to assuming the lower bound of a string is 1 - tests often make the same assumption). So it is best to avoid the first form unless you have a particular need for dispatching on an access value (which won't happen here, because the designated type is class-wide). Randy.