---
title: "Comment by Mitch Kuppinger on \"Proposal for making private method work on constants too\" | Hashnode"
description: "For a long time I believed placing a constant below the private method actually made it private. Then I set a 'private' constant in a class where was no reason"
url: "https://hashnode.com/posts/proposal-for-making-private-keyword-work-on-constants-too/66bdac4658ecf7720017c076/comment/66c77ea9de7a66c6dcb43414"
---

[Discussion](https://hashnode.com/posts/proposal-for-making-private-keyword-work-on-constants-too/66bdac4658ecf7720017c076)

Comment [Proposal for making private method work on constants too](https://hashnode.com/posts/proposal-for-making-private-keyword-work-on-constants-too/66bdac4658ecf7720017c076)

[Mitch Kuppinger](https://hashnode.com/@DocPneumo)

[Aug 22, 2024](https://hashnode.com/posts/proposal-for-making-private-keyword-work-on-constants-too/66bdac4658ecf7720017c076/comment/66c77ea9de7a66c6dcb43414)

For a long time I believed placing a constant below the private method actually made it private. Then I set a 'private' constant in a class where was no reason to use that constant outside of the class... But naming is hard and memory is not perfect so I used the same constant name elsewhere. I forgot it existed as a **not** 'private' constant in another class. Bang!

The principle of least surprise should apply whenever possible.

Thank you for re-raising this.

[Lucian Ghinda](https://hashnode.com/@lucianghinda)

[Aug 31, 2024](https://hashnode.com/posts/proposal-for-making-private-keyword-work-on-constants-too/66bdac4658ecf7720017c076/comment/66c77ea9de7a66c6dcb43414#reply-66d29b0620a97f91261f498b)

Yes, this is a great example of why I think private should work with constants.

Thank you for sharing your example here.
