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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6e696296ba7c3482 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: parameters in bindings Date: 1996/03/26 Message-ID: #1/1 X-Deja-AN: 144412245 references: organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-03-26T00:00:00+00:00 List-Id: Mitch says " type thing is record ... end record; type thing_access is access all thing; procedure P (param: thing_access); x: aliased thing; begin p(x'access); The type thing_access is an extra junk type that has no other use in the program. No actual objects of type thing_access are ever declared or used. It is just there to allow the parameter to be declared. This extra type is not needed with method 1 of declaring P. To me the declaration of thing_access is extra useless baggage." And no doubt a C programmer would find many type declarations in an Ada program "useless baggage", but the response would be the same, types are important. thing_access is not an extra junk type that is not used, it is the type of values passed to procedure P. I still don't like the general use of anonymous access types for this, they just don't seem right, since an access to an object should be exactly that, an access to an object, so it makes no conceptual sense for an access parameter to be null. A VALUE of an access type can on the other hand perfectly well be null. dp p