When looked abstractly, both private name and weak maps propose an equivalent feature: a mapping between 2 unforgeable references and a value. Both allow to share a secret with someone assuming the knowledge of 2 unforgeable entities. Both have the interesting property of symmetric non-discoverability:
- Given an object, you can't list all private names
- Given a private name, you can't list all objects which have this name as a property
- Given a weak map, you can't list all objects used as keys