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=0.7 required=5.0 tests=BAYES_00,INVALID_MSGID, PDS_OTHER_BAD_TLD autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,900edaa189af2033 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Ada95 OOP Questions Date: 1996/08/02 Message-ID: #1/1 X-Deja-AN: 171850808 references: <4tibbb$lrn@mailsrv2.erno.de> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-08-02T00:00:00+00:00 List-Id: Thomas said "No, it doesn't look better, at least to me. (OK, this is a 5-liner; consider a 'real' program.) Having been working on large-scale Ada projects for years, I have learned to avoid the use of use as much as possible." This seems an inappropriate knee-jerk reaction to use. Thomas did you read the thread on the issue of use and dispatching calls. Remember that your experience on "large scale Ada projects" has been based on a totaly different environment than we are talking about now, namely one in which no dynamic dispatching occurs. Generally in Ada 83, people like to avoid use so that when they see Pkg.xyz they know that they can find the routine that will be called in Pkg (the spec in the spec of Pkg and the code in the body). The trouble is that with a dispatching call, you write Pkg.xyz and it does NOT mean that the code is in Pkg -- as Laurent noted, it does mean the relevant spec is in the spec of Pkg, but the whole point of dispatching is to make sure that at compile time you have no idea where the code that will actually be called resides, indeed the code may be in a unit that has not been written yet. A number of people find that confusing, and so are willing to onsider using "use" for the dispatching case. You may or may not agree, but it is certain that your previous Ada 83 experience is not a useful guide here.