"J-P. Rosen" wrote in message news:pelb5u$cqo$1@gioia.aioe.org... > Le 30/05/2018 à 00:41, Randy Brukardt a écrit : ... >>(Of course, >> the real problem above is "package use clauses", don't use (ahem) them >> and >> you can't possibly have this problem.) >> ???? > With use clauses, you'll have to write: > when Ada.IO_Exceptions.End_Error => > > while without use clauses, you'll have to write: > when Ada.IO_Exceptions.End_Error => > > I fail to see the "real problem". Use clauses make the code more > readable, and when there is an ambiguity, you fall back to what you > would do without them. What's the problem? (A) The person I was responding to was upset that they had to write the fully qualified name in this case, and practically, they're right. (Tucker has complained about this multiple times.) (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). If Ada had made objects/exceptions overloadable, this problem would be much less severe. But it didn't, and changing that now would be difficult to do without lots of subtle incompatibilities. Use type/use all type (and better still, prefix calls) mostly avoid this problem by only operating on overloadable things. You still can get conflicts, but only when there are design issues (having multiple operations with the same name and profile means either there is unnecessary duplication [two routines doing the same thing] or that there is routines doing different things with the same name (yikes!). In a best case world, a rename conflicting with the original routine or another rename of it would be ignored in all use clauses, along with overloading of objects/exceptions. That would reduce conflicts to a handful of cases. (If overloading of generics could be figured out, that would be even better.) But that has to wait for Ada++. Randy.