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: fac41,2c6139ce13be9980 X-Google-Attributes: gidfac41,public X-Google-Thread: f43e6,2c6139ce13be9980 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,3d3f20d31be1c33a X-Google-Attributes: gid103376,public From: mw@ipx2.rz.uni-mannheim.de (Marc Wachowitz) Subject: Re: Interface/Implementation (was Re: Design by Contract) Date: 1997/09/12 Message-ID: <5var3e$s63$1@trumpet.uni-mannheim.de>#1/1 X-Deja-AN: 271805486 Organization: --- Newsgroups: comp.software-eng,comp.lang.ada,comp.lang.eiffel Date: 1997-09-12T00:00:00+00:00 List-Id: Joachim Durchholz wrote: > Ada, if we have a name clash, we're forced to > type the full module name wherever a clashing name is used (at least > that's what I remember, corrections welcome!). If you merely import a package, by means of a "with" clause, you cannot get any name clashes at all, no matter what's in the package, since every reference is qualified with the package name. If you don't like some name, e.g. of a package or a type or a variable or a routine or an exception, you can introduce another name for it (which may be local, but can also be exported by a package). This can as well be used to introduce non-qualified names specifically for that imported stuff which you want, without being bothered by whatever else the package exports, or might export in the future. Only if you really call for it, by means of a "use" clause, all the stuff exported by an imported package will become visible in the client's scope, and thus be a potential source for name clashes (for routines only where overloading can't resolve the conflict). Many people don't like use-clauses, and some projects don't allow them. They are never necessary at all, only a way to reduce typing (i.e. on the keybord, this isn't about type checking). -- Marc Wachowitz