Hi,
I was surprised to see there is no way to specify directly a default for a package generic formal parameter. I wonder why. It would contribute to simplify generics substancially. I suppose there was an RFC on this topic but can’t find it… and I wonder why it hasn’t been adopted yet, or attempted as a GNAT extension ?
The current ARG AI for it is
http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AI12s/AI12-0297-1.TXT
However this is a split off of the original discussion which used to cover a lot of formals but now only covers types. That discussion is here
http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai12s/ai12-0205-1.txt?rev=1.10
They implemented it for types in Ada 22 (not sure if Gnat does yet or not). I don’t know the status on packages
I see that defaults for formal packages (and in out formal objects) are the last features not decided uppon yet. Since they introduced the brand new syntax “or use” for types, they might as well use it for packages… I wonder why they didn’t. Things improve. I read some debates over the years, it’s hilarious to realize that many many times, including for things as semantically important as these, they stop not because of difficulties of implementation or backward incompabilities… But because of nearly aesthetic disagreements.