Re:Public/protected/private is an unnecessary feature
by colanderman on Friday June 20, 2025 @01:22PM
(#44329878)
Yes, it does matter even in functionally pure languages.
If the inner structure of your API's types are visible to callers, that's now part of your API, because callers can and will start to rely on that specific representation. Now you're constrained from updating your API, in order not to break code which depends on it.
If the inner structure of your API's types are visible to callers, that's now part of your API, because callers can and will start to rely on that specific representation. Now you're constrained from updating your API, in order not to break code which depends on it.