# Saturday Ada visibility puzzle

**URL:** https://forum.ada-lang.io/t/saturday-ada-visibility-puzzle/4793
**Category:** General
**Created:** [October 3, 2026, 10:45am UTC](https://forum.ada-lang.io/t/saturday-ada-visibility-puzzle/4793 "2026-10-03T10:45:05Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)
#### Post date: [October 3, 2026, 10:45am UTC](https://forum.ada-lang.io/t/saturday-ada-visibility-puzzle/4793/1 "2026-10-03T10:45:05Z")

</div>

Is this legal?

```ada
with Standard.Ada;
procedure Foo is
begin
   null;
end Foo;

```

---

<div class="post-metadata">

### Author: ![Nordic\_Dogsledding](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/nordic_dogsledding/32/547_2.png) [@Nordic\_Dogsledding](https://forum.ada-lang.io/u/Nordic_Dogsledding)
#### Post date: [October 3, 2026, 5:56pm UTC](https://forum.ada-lang.io/t/saturday-ada-visibility-puzzle/4793/2 "2026-10-03T17:56:17Z")

</div>

If there is a user defined package `Standard` with child unit `Ada`, then yes, of course.  
The fully expanded name of this package `Standard` woult be `Ada.Standard`.

Thou shalt not name an Ada unit Standard.

---

<div class="post-metadata">

### Author: ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)
#### Post date: [October 3, 2026, 6:33pm UTC](https://forum.ada-lang.io/t/saturday-ada-visibility-puzzle/4793/3 "2026-10-03T18:33:46Z")

</div>

> [@Nordic\_Dogsledding](#):
>
> Thou shalt not name an Ada unit Standard.

God forbid, that blashpemy.

But what would you say about this:

```ada
with Ada;
package W renames Standard.Ada;

```

(The question is about the extent of the rule that all top-level packages are children of the package Standard.)

---

<div class="post-metadata">

### Author: ![Nordic\_Dogsledding](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/nordic_dogsledding/32/547_2.png) [@Nordic\_Dogsledding](https://forum.ada-lang.io/u/Nordic_Dogsledding)
#### Post date: [October 4, 2026, 5:19pm UTC](https://forum.ada-lang.io/t/saturday-ada-visibility-puzzle/4793/4 "2026-10-04T17:19:36Z")

</div>

> [@Nordic\_Dogsledding](#):
>
> The fully expanded name of this package `Standard` woult be `Ada.Standard`.

Excuse me for writing nonsense. Such a package’s full name would be `Standard.Standard`, but I doubt this could be written. (Any library unit’s `X` full name is `Standard.X`.)

---

<div class="post-metadata">

### Author: ![Nordic\_Dogsledding](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/nordic_dogsledding/32/547_2.png) [@Nordic\_Dogsledding](https://forum.ada-lang.io/u/Nordic_Dogsledding)
#### Post date: [October 4, 2026, 5:22pm UTC](https://forum.ada-lang.io/t/saturday-ada-visibility-puzzle/4793/5 "2026-10-04T17:22:20Z")

</div>

> [@dmitry-kazakov](#):
>
> ```ada
> with Ada;
> package W renames Standard.Ada;
> 
> ```
> 
> (The question is about the extent of the rule that all top-level packages are children of the package Standard.)

Since a user defined package `Standard` is not visible, declaring `W` should be well defined. (I did not ask the compiler.)

---

<div class="post-metadata">

### Author: ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)
#### Post date: [October 4, 2026, 8:09pm UTC](https://forum.ada-lang.io/t/saturday-ada-visibility-puzzle/4793/6 "2026-10-04T20:09:56Z")

</div>

> [@Nordic\_Dogsledding](#):
>
> I did not ask the compiler.

I did. GNAT rejects with `Standard.Ada`, but accepts `rename Standard.Ada`.

The argument of **with** is _library\_unit_\_name. The argument of **rename** is _package_\_name.

My theory is that the name of a library item must be in “canonical” form. The package Standard is a library item without a library item name, yet it has a package name.
