On Wed, 1 Nov 2017, tclwarrior@gmail.com wrote: > i meant to say, why doesn't "use" imply "with" i think every time you > insert a use, you will most definitely add a with Well, in short textbook examples you will find something like "with Ada.Text_IO; use Ada.Text_IO", as the so-called "context clause" (the first few lines of code, with only "with" and "use" clauses). But you should not extrapolate to larger programs. You may have to "with" plenty of packages. But if they "use" more than one or two of them in the context clause, the readability of your program quickly declines. It can be quite hard to figure out to which package a certain subprogram you are calling belongs to. It is often better to "use" libraries locally, rather than in context clauses. On the other hand, to "use" them (or to use them without a "use" clause), you must always "with" them in the context clause. You could say, the "with"s in the context clause define the dependencies of your program. Variant 1: use in context clause: with Ada.Text_IO; use Ada.Text_IO; procedure Hello_World is begin Put_Line("Hello World!"); end Hello_World; Variant 2: "use" local with Ada.Text_IO; procedure Hello_World is use Ada.Text_IO; begin Put_Line("Hello World!"); end Hello_World; In thsz example, the difference between context-clause "use" and local "use" does not really matter. But if you have a bigger package, it greatly improves the readability to "use Ada.Text_IO" only in those subprograms, which actually perform textual IO. Same for "use"ing other packages in other subprograms, of course. > i think in a program with a large import (use) list of libraries, this can > save many lines and looks cleaner As I worte before: You may have to "with" a long list of libraries, but you should never "use" more than one or two of them in the context clause. -------- I love the taste of Cryptanalysis in the morning! -------- www.uni-weimar.de/de/medien/professuren/mediensicherheit/people/stefan-lucks ----Stefan.Lucks (at) uni-weimar.de, Bauhaus-Universität Weimar, Germany----