From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: using `use' : what is the best practice ?
Date: Sun, 12 Jun 2011 07:19:52 +0200
Date: 2011-06-12T07:19:52+02:00 [thread overview]
Message-ID: <op.vwx6fek6ule2fv@douda-yannick> (raw)
In-Reply-To: 03a8fa21-b515-41ea-bc65-b6ab85b0e88c@25g2000yqn.googlegroups.com
Le Wed, 08 Jun 2011 01:38:53 +0200, Shark8 <onewingedshark@gmail.com> a
écrit:
> While this is true it can be handy for reducing prefix-clutter,
> as could a rename. So, while you may be hesitant to use them on the
> package, I find using them in declare-blocks and subprograms to be
> quite readable and usable.
>
> With
> Ada.Text_IO;
>
> Package Body Example is
> [...]
> Procedure Something_Interesting is
> Use Ada.Text_IO; -- We're debugging here.
> begin
> [...]
> Put_Line( "Debugging marker." );
> [...]
> end Something_interesting;
> End Example;
That's a common idiom in Jean Pierre Rosen's source ;)
> Ah, I like to use the comma-separated forms of use/with; this can be
> helpful if you wish to do a quick commenting out of a use or with to
> pass to the compiler and see if you really need it at all.
>
> EX:
> With
> Ada.Text_IO,
> --Ada.Integer_IO, -- Am I even using Ada.Integer_IO?
> --Ada.Tags,
> --MY_PARSING_PACKAGE,
> [...]
> MY_CONSOLE_MANIPULATION_PACKAGE
To talk again about him, you may also use his AdaDep tool for that purpose
;)
Have a look: http://www.adalog.fr/compo2.htm#adadep
--
“Syntactic sugar causes cancer of the semi-colons.” [Epigrams on
Programming — Alan J. — P. Yale University]
“Structured Programming supports the law of the excluded muddle.” [Idem]
“c++; /* this makes c bigger but returns the old value */” [Anonymous]
next prev parent reply other threads:[~2011-06-12 5:19 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 15:32 using `use' : what is the best practice ? milouz
2011-06-07 15:59 ` Simon Wright
2011-06-07 16:22 ` Dmitry A. Kazakov
2011-06-07 16:59 ` Simon Wright
2011-06-07 17:25 ` Dmitry A. Kazakov
2011-06-07 17:29 ` Simon Wright
2011-06-07 19:38 ` Dmitry A. Kazakov
2011-06-11 14:11 ` Yannick Duchêne (Hibou57)
2011-06-08 9:07 ` Paul Colin Gloster
2011-06-08 11:20 ` stefan-lucks
2011-06-08 16:45 ` Vinzent Hoefler
2011-06-11 14:05 ` Yannick Duchêne (Hibou57)
2011-06-07 17:33 ` Pascal Obry
2011-06-08 2:42 ` Randy Brukardt
2011-06-12 5:09 ` Yannick Duchêne (Hibou57)
2011-06-07 18:51 ` Jeffrey Carter
2011-06-08 0:04 ` Peter C. Chapin
2011-06-07 19:32 ` Anders Wirzenius
2011-06-07 23:38 ` Shark8
2011-06-12 5:19 ` Yannick Duchêne (Hibou57) [this message]
2011-06-12 7:55 ` Stephen Leake
2011-06-08 4:25 ` Jerry
2011-06-08 9:31 ` milouz
2011-06-08 17:17 ` Ludovic Brenta
2011-06-08 18:43 ` Jeffrey Carter
2011-06-09 10:40 ` Address arithmetic alternatives milouz
2011-06-09 11:25 ` Georg Bauhaus
2011-06-09 18:53 ` Jeffrey Carter
2011-06-08 19:22 ` using `use' : what is the best practice ? Pascal Obry
2011-06-09 1:17 ` Shark8
2011-06-09 10:44 ` milouz
2011-06-08 6:06 ` stefan-lucks
2011-06-15 2:25 ` Adrian Hoe
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox