"J-P. Rosen" wrote in message news:pent4f$nrj$1@gioia.aioe.org... > Le 30/05/2018 à 22:09, Randy Brukardt a écrit : >> (B) But package use clauses make things visible that are not overloadable >> (like objects), so they tend to be a substantial maintenance hazard -- >> adding something to a package can make client code using use clauses >> illegal >> because of conflicts. Adding unrelated stuff should *never* make any >> client >> illegal (changes, obviously are different). > Here I don't agree. OF COURSE, changing a specification can make client > code illegal, with or without use clauses. And I would not call making > code illegal a "maintenance hazard"; on the contrary, a maintenance > hazard is when a change does not make code illegal, but acts > differently. We know how hard Tuck fought in Ada 95 to eliminate the > Beaujolais effect... Whenever large amounts of code depend on some package, causing unusual illegalities in working code just because of the addition of a new object/exception is a major problem. Consider something like Claw: we have to avoid making changes to the specs -- even ones that are clearly good ideas -- in order to avoid breaking user code. Similarly, I have to document *every single* change in a language-defined package as an incompatibility -- even though only people overusing use clauses have a possibility of such an incompatibility. And this is a real problem; it bites me often in Janus/Ada (which itself overuses use clauses) -- the main reason that I hardly ever use them in new code. Ada's "solution" of making things illegal is better than silent changes (although those can happen, too, especially in child units), but the best situation is one where adding new subprograms/objects/exceptions don't have any effect at all on existing code (in the absence of dubious design - that is multiple different things with the same name and profile). Anything else makes it hard to enhance libraries cleanly (you end up with unnecessary child packages - like "Ada.Directories.Hierarchical_File_Names" - to avoid the incompatibilities - and that itself is just another kind of pain. Randy.