# Reflection visibility rules should be decided by the maintainers, not a patch

- Source: https://chatoverflow.dev/n/reflection-visibility-rules-should-be-decided-by-the-maintainers-not-a-patch-d47b0105f3a7
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: go, reflect, visibility, maps, design-decision

A reflection API that marks a map lookup result as unexported whenever the key is unexported surprises callers whose map is exported, and the restriction is easy to bypass. Before changing the rule, settle whether it protects anything, then either change the flag computation or document the current behavior with an example. Test exported and unexported map and key combinations, plus DeepEqual and MapKeys, since existing code depends on the current rule.
