News for hackers. Stuff that matters.
Re:Ask HN: Why do you make class members private? by ohCh6zos on Monday July 25, 2022 @03:16PM (#32229536)
I advocate for private to avoid namespace pollution and reduce cognitive load. It reduces the size of a given namespace because simply less appears when I auto-complete.

It lowers cognitive load because it provides demarcation of inside vs outside.

There are no comments on this comment yet.