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,ad62d6b425bebfec X-Google-Attributes: gid103376,public From: jsa@alexandria (Jon S Anthony) Subject: Re: "use" clauses and Ada 95 OOP Date: 1996/07/24 Message-ID: #1/1 X-Deja-AN: 169924378 sender: news@organon.com (news) references: organization: Organon Motives, Inc. newsgroups: comp.lang.ada Date: 1996-07-24T00:00:00+00:00 List-Id: In article guerby@gnat.com (Laurent Guerby) writes: > Mitch> pkg1.func(x) > > Mitch> calls the code that is in the body of pkg1. The syntax in fact > Mitch> implies that strongly. [...] > > This notation implies that the specification is in pkg1, and the > specification is the important thing, since it's here I'll find the > documentation (no need to look at the body ;-). Yes, that's what it strictly implies (from the rules), but it is not hard to understand the point of view (perhaps of a "newcomer") that the visual cue strongly suggests the call is to the func declared in pkg1. I don't have a problem with the notation and do not see it that way. Many others "in the know" don't either. Actually, if anything is a source of potential confusion in this respect, it is the parameter x. If it is declared "far enough" away from the call site and you don't annotate the call with something like "-- Dispatch to proper func" or use an explicit 'Class conversion, it could be misleading for a casual read. This is true irrespective of using a qualified name (well, unless you use the abstract approach I mentioned in a previous post). For example, does pkg1.func(x) dispatch or is it bound to pkg1.func? Depends on how x is declared (or whether pkg1 contains the abstract root and operations, which would tell you the call must be dispatching). /Jon -- Jon Anthony Organon Motives, Inc. 1 Williston Road, Suite 4 Belmont, MA 02178 617.484.3383 jsa@organon.com