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 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-23 01:05:40 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!jussieu.fr!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Context syntax proposals, using "with", withing "use" etc. Date: 23 Dec 2003 04:02:36 -0500 Organization: Cuivre, Argent, Or Message-ID: References: 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 1072170169 76131 80.67.180.195 (23 Dec 2003 09:02:49 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Tue, 23 Dec 2003 09:02:49 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: In-Reply-To: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 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:3738 Date: 2003-12-23T04:02:36-05:00 "Alexandre E. Kopilovitch" writes: > 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. Hmm. I'd say this is also a text editor problem; the editor should provide an easy way to put the cursor on the "package" keyword, skipping the context clause. My Emacs Ada-mode does that. That's one advantage of Ada over C; there is a clear end to the context clause. > 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; I don't see how this reduces clutter, or total size. The text editor still needs to be able to skip the context clause. -- -- Stephe