From: Jacob Sparre Andersen on
J-P. Rosen wrote:
> Colin Paul Gloster a �crit :

>> Why did you consider a book which makes which packages things are in
>> unclear by mutiliating programs by means of the USE keyword to be
>> excellent?
>
> Because it makes lisibility a lot better by drawing attention of the
> reader on what actually the thing does, and getting rid of useless
> information that you can find easily by clicking on the identifier and
> selecting "go to declaration".
>
> (Ok, Ok, I'm a bit provocative here, but I'm tired of seeing people
> jumping on beginners and insisting on a notation that can drive them
> away of the language screaming).

When I taught Ada, I tried to avoid "use" (at least for newly introduced
packages) in my notes for the students. But at the same time I
encouraged the students to use "use" in a sensible - and not quite so
limited way - in their own code.

This seemed to work reasonably well.

But simply referring the students to a "go to declaration" feature in
their editors might also be a solution, once the code is in an editor.

Greetings,

Jacob
--
Those who can't laugh at themselves leave the job to others.
From: BrianG on
Jacob Sparre Andersen wrote:
> J-P. Rosen wrote:
....
>> Because it makes lisibility a lot better by drawing attention of the
>> reader on what actually the thing does, and getting rid of useless
>> information that you can find easily by clicking on the identifier and
>> selecting "go to declaration".
>>
....
>
> But simply referring the students to a "go to declaration" feature in
> their editors might also be a solution, once the code is in an editor.
>

And (depending on the editor) once it has been compiled, or even is able
to be compiled.

A middle ground might be to limit yourself to a single use - then you
know where something is from, if it's not obvious.

Personally, I prefer a renames if I want to declutter the code (once
you've reached that, if you're teaching).

--Brian