Hi
Am 2025-11-23 20:25, schrieb Rob Landers:
All in all, I feel that file-private symbols would solve many of the
same problems, but be much easier to reason about. The SessionManager
from your example could just be file-private.
You can use private(namespace) as effectively file-private, just use a
namespace in a single file. And, if you need to refactor, you don’t
need to be constrained to a single file.
The value of file-private for me is avoiding *naming collisions* for
“helper functionality”, not restricting the API. For this purpose
single-file namespace with namespace-private symbols would provide no
value over just using a “hard to guess” class or function name, since in
either case “external” code could also define symbols in that namespace.
Best regards
Tim Düsterhus