News for hackers. Stuff that matters.
Re:Public/protected/private is an unnecessary feature by bdangubic on Friday June 20, 2025 @12:20AM (#44324717)
make everything immutable and then it doesn’t matter :)
Re:Public/protected/private is an unnecessary feature by dwelch2344 on Friday June 20, 2025 @12:30AM (#44324766)
Tell me you haven't written a large library for a wide array of users (many of which you wouldn't trust with a potato peeler) without telling me
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.