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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fce663eaf40b52f6 X-Google-Attributes: gid103376,public Date: Fri, 07 May 2004 13:18:52 +0200 From: Manuel Collado User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: with use - again [Was: Manifesto against Vector] References: <13387035.PloetEPshz@linux1.krischik.com> In-Reply-To: <13387035.PloetEPshz@linux1.krischik.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 138.100.10.20 Message-ID: <409b709e@news.upm.es> X-Trace: 7 May 2004 13:18:54 +0100, 138.100.10.20 Path: controlnews3.google.com!news2.google.com!news1.google.com!news.glorb.com!newsfeed.stueberl.de!solnet.ch!solnet.ch!irazu.switch.ch!switch.ch!news.rediris.es!news.upm.es!138.100.10.20 Xref: controlnews3.google.com comp.lang.ada:361 Date: 2004-05-07T13:18:52+02:00 List-Id: Martin Krischik wrote: > Russ wrote: > ... > > >>with/use Ada.Integer_Text_IO;> > >>is cleaner and simpler than >> >>with Ada.Integer_Text_IO; use Ada.Inteqer_Text_IO > > > You know that this has cost me when I first read Ada Tutorials and tried to > understand what what was going on. Every package was "use"d and I was > wondering: And where is this function, procedure, exception coming from? > > The use of "use" should be forbidden in tutorials. > > >>And I also that it is a trivial matter to parse the former to produce >>the latter. I could do it myself in a few minutes. Nor does it break >>compatibility with legacy code in any way. I see absolutely no >>reasonable objection to "with/use" (but I have a funny feeling that I >>may soon be bombarded with a lot of unreasonable objections). > > > Why unreasonable? "use" make reading code harder. "package IIO renames > Ada.Inteqer_Text_IO" is far better on the reading side. > ... Perhaps the 'use' clause could be made selective, as in the IMPORT clauses of Modula-2: Modula-2 (1) IMPORT module; (same as 'with module;') (2) FROM module IMPORT name1, name2, ...; (selective visibility) (3) FROM module IMPORT ...everything...; (everything visible) The equivalent Ada clauses would be: Ada (1) with module (2) with module; ... use module (name1, name2, ...); (non Ada yet) (3) with module; ... use module; Perhaps the form (2) of the 'use' could be an useful addition to the Ada language, and it wouldn't break any existing code. -- To reply by e-mail, please remove the extra dot in the given address: m.collado -> mcollado