Skip to content

Added a simple analogy for understanding the singleton pattern #3257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

itsmegayu
Copy link

Pull Request Template

What does this PR do?

Copy link

github-actions bot commented Apr 18, 2025

PR Summary

Added a simple analogy to the singleton/README.md file to improve understanding of the singleton pattern using the example of a company's leader.

Changes

File Summary
singleton/README.md Added a new section with an analogy to explain the singleton pattern. The analogy compares a singleton to a company's leader, where there's only one leader for everyone to interact with, just like a singleton class having only one instance.

autogenerated by presubmit.ai

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • 29d1f8e: Added easy analogy for Singleton pattern using company Leader example
Files Processed (1)
  • singleton/README.md (1 hunk)
Actionable Comments (0)
Skipped Comments (1)
  • singleton/README.md [40-42]

    enhancement: "Improve analogy by mentioning limitations."

@iluwatar
Copy link
Owner

Thanks, but there already is an analogy in the README.md (see "Real-world example")

@iluwatar iluwatar closed this Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants