Skip to content

Added a simple analogy for understanding the singleton pattern#3257

Closed
itsmegayu wants to merge 1 commit into
iluwatar:masterfrom
itsmegayu:add-singleton-comment
Closed

Added a simple analogy for understanding the singleton pattern#3257
itsmegayu wants to merge 1 commit into
iluwatar:masterfrom
itsmegayu:add-singleton-comment

Conversation

@itsmegayu
Copy link
Copy Markdown

Pull Request Template

What does this PR do?

@github-actions
Copy link
Copy Markdown

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
Copy Markdown

@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."

@sonarqubecloud
Copy link
Copy Markdown

@iluwatar
Copy link
Copy Markdown
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