Skip to content
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

Drop singleton #25

Merged
merged 3 commits into from
Aug 31, 2017
Merged

Conversation

peter-gribanov
Copy link
Contributor

@peter-gribanov peter-gribanov commented Aug 29, 2017

Fix for Don't write to global functions.

Singleton is a anti-pattern.
You change a global config() function to a global instance of Configuration class.
This is very, very bad.

README.md Outdated
];
```

Or a [YAML](https://en.wikipedia.org/wiki/YAML) configuration file
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd keep it simple with 1 example to do things. That would keep point more clear.

@TomasVotruba
Copy link
Contributor

I like the singleton-drop change.

@piotrplenik piotrplenik changed the title [Bullshit] Singleton is a anti-pattern Drop singleton Aug 29, 2017
@piotrplenik
Copy link
Owner

Yes - I agree to drop singleton, but with one example only.

@peter-gribanov
Copy link
Contributor Author

@jupeter i can restory singleton examle and mark it as bad.

@peter-gribanov
Copy link
Contributor Author

I add bad Singleton example and remove YAML config.

@TomasVotruba
Copy link
Contributor

@peter-gribanov Could you decouple the singleton example to standalone item?

@peter-gribanov
Copy link
Contributor Author

@TomasVotruba I create a new section. You can complete the description.

@TomasVotruba
Copy link
Contributor

Thank you, this is good enough

@TomasVotruba TomasVotruba merged commit dcae9bc into piotrplenik:master Aug 31, 2017
@peter-gribanov peter-gribanov deleted the global_functions branch August 31, 2017 21:07
TomasVotruba pushed a commit that referenced this pull request Feb 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants