# What does the new "public" keyword actually do?

**URL:** <https://discourse.julialang.org/t/what-does-the-new-public-keyword-actually-do/108975>\
**Category:** General Usage\
**Tags:** question\
**Created:** [January 18, 2024, 5:25pm UTC](https://discourse.julialang.org/t/what-does-the-new-public-keyword-actually-do/108975 "2024-01-18T17:25:34Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [January 18, 2024, 6:14pm UTC](https://discourse.julialang.org/t/what-does-the-new-public-keyword-actually-do/108975/3 "2024-01-18T18:14:10Z")

</div>

> [@goerz](#):
>
> Does the new `public` keyword actually do anything? From the current 1.11 documentation and release notes, I don’t see that `public` has any effect on `using`/`import`.

It affects `names(module)`, which now includes by default identifiers that are non-exported but marked `public`.

So, basically, it gives an automated way to list the API of a module that is intended to be documented and non-private, whether or not it is exported into your namespace by `using`.

There is also a new `Docs.undocumented_names(module)` function that can be used in testing to check whether there are any names that are “public” (including exported symbols) that don’t have a docstring, i.e. with `@test isempty(Docs.undocumented_names(MyModule))`.

(In the future, one could imagine QA tools that check whether a package uses any non-public symbols from another package.)

---

_[View the full topic](https://discourse.julialang.org/t/what-does-the-new-public-keyword-actually-do/108975)._
