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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,165099e7c0cb959,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-22 15:55:28 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!skynet.be!freenix!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: "Alexandre E. Kopilovitch" Newsgroups: comp.lang.ada Subject: Context syntax proposals, using "with", withing "use" etc. Date: Tue, 23 Dec 2003 02:53:13 +0300 (MSK) Organization: Cuivre, Argent, Or Message-ID: NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: melchior.cuivre.fr.eu.org 1072137206 2556 80.67.180.195 (22 Dec 2003 23:53:26 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Mon, 22 Dec 2003 23:53:26 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: X-Mailer: Mail/@ [v2.44 MSDOS] X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.3 Precedence: list List-Id: Gateway to the comp.lang.ada Usenet newsgroup List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:3727 Date: 2003-12-23T02:53:13+03:00 After watching for some time the prolonged dances around "with and use", I'm inclined to contribute to the topic. First, I'd like to say that all the arguments concerned with repeating of a package's name aren't serious at all: as for extra typing, this is a matter of a text editor, not of the language; and as for a possibility of mistake (that is, placing an unintended package's name in "use"), it is a matter of a style and a corresponding style checker compiler option - you have little chance to get such a mistake unnoticed with a quite simple rule: for example, always place "use" and "with" in the same line, and never mix different packages in the same line (compiler can easily verify that). Second, there is still a displeasure here, which can even become a hindrance in some circumsrances: when there are many context clauses for a package, they just occupy too big part of the text; and because those context clauses are necessarily at the beginning of each package, they intersperse and clutter the whole program, which makes reading more difficult (even if each package has its own window) - if one tried not to study thoroughly, but just to read and catch the general method\logic\approach of the program. So my guess is that the real reasons demanding the changes for "with" and "use", if any, aren't about repeated package names, but actually about overall amount of the text in (all) context clauses (and exclusion of repeated package names simply decreases this amount). Therefore I think that explicit separatation of the whole context from the package's specs as well as from the package's body would be much more consistent and useful step (than all possible manipulation with "with" and "use" only) for the purpose. I mean something like that: package MyDream context is -- or package context MyDream is - if you like it better with ...; with ...; use ...; ... end MyDream; package MyDream is ... end MyDream; package body MyDream context is with ...; with ...; use ...; ... end MyDream; package body MyDream is ... end MyDream; Certainly there may be other syntactic forms for that separation, and extra keyword ("context") may be avoided... although it seems in place there. Alexander Kopilovitch aek@vib.usr.pu.ru Saint-Petersburg Russia