Tibor Bödecs 5/22/2018

Swift singleton design pattern

Read Original

This article discusses the Swift singleton design pattern, addressing why it's often criticized as an anti-pattern due to issues with global mutable states and side effects. It explains what a singleton is, its pitfalls, and provides guidelines on when it is appropriate to use one, such as for UIApplication or a Logger class, within iOS projects.

Swift singleton design pattern

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
The Beautiful Web
Jens Oliver Meiert 2 votes
2
Container queries are rad AF!
Chris Ferdinandi 2 votes
3
Wagon’s algorithm in Python
John D. Cook 1 votes