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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8ceb83dbf250e264 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Problem with instantiating generic procedure Date: 1999/07/19 Message-ID: <7mtt6e$ec0$1@nnrp1.deja.com>#1/1 X-Deja-AN: 502535562 References: <7mqfcq$9og$1@pegasus.csx.cam.ac.uk> <7ms4en$kl8$1@pegasus.csx.cam.ac.uk> X-Http-Proxy: 1.0 x39.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Mon Jul 19 00:57:54 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-07-19T00:00:00+00:00 List-Id: In article , Florian Weimer wrote: > From my limited point of view, I don't see it either. > > There's a related thing I'd like to see improved in a future Ada > revision: pragma Import requires the use of renaming declarations as > well if the Ada functions in question are overloaded. The effects are > quite similar here (namespace pollution). But the name space pollution is a minimal problem, because it occurs only in private parts or in package bodies, not in package specs. We did discuss the possibility of completing subprogram declarations with generic instantiations, but it was considered too much machinery for too little gain. Remember this is just syntactic sugar for defining a body which does the instantiation internally and then calls the procedure. In practice, this is the way it would be implemented in any case. I would guess this is in practice of minimal importance. In all the use of GNAT so far, this issue has never come up, so it is certainly not something that many people expect to be there! As for pragma Import, the renaminings can all be done in the private part, so this is not really a burden: package p is procedure q; procedure q (x : integer); private procedure q_no_args renames q; procedure q_int_arg (x : integer) renames q; pragma Import (C, q_no_args); pragma Import (C, q_int_arg); end p; Indeed, since you need separate names for the routines that implement these two cases, forcing names to be used in this way can actually make things clearer! > Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.