NEW: English for Tech Bundle → Save 38%
Your progress…

Loading your progress…

Home
Code & Deliverynoun · /ˈsɪŋɡəltən/

singleton

singleton — A design pattern that restricts a class to have only one instance and provides a global point of access to that instance.

In simple English

In software engineering, a singleton is a creational design pattern that ensures a class has exactly one instance throughout the application lifecycle. This is useful for managing shared resources like database connections, logging systems, configuration managers, or thread pools. When you implement the singleton pattern, you control how the single instance is created and accessed, typically through a static method like getInstance(). In real tech workplaces, developers discuss singletons when designing systems that need centralized control or when reviewing code to ensure proper resource management. Teams debate whether to use singletons or dependency injection, as singletons can sometimes make testing harder or create hidden dependencies.

Understanding what the singleton design pattern is and when to use it in software architecture.

At a glanceCEFR C1
Commonness4/5
Versatility4/5
FormalityCasualFormalFormal
Spoken ↔ WrittenSpokenWrittenBoth
Directness ↔ DiplomaticDirectDiplomaticDirect
RegionUS and UK

Say it like this

  • We implemented it as a singleton pattern
  • Make sure the logger is a singleton
  • Avoid singletons when possible; use dependency injection instead

Use it at work

Code review

  • Do we need a singleton here? It makes testing hard.
  • The database client is a singleton.

Explaining

  • A singleton has only one instance in the app.
  • Use dependency injection instead of a singleton.

Debugging

  • The singleton keeps state between tests.
  • The singleton isn't thread-safe.

Don't say this

✕The singleton ensures we have multiple instances of the class.
✓The singleton ensures we have only one instance of the class.

Singleton by definition restricts the class to a single instance, not multiple instances.

Practice

Try it

4 quick exercises

Pick the most natural phrasing

1. Your team is discussing how to manage the application's configuration file. What would you say?

Complete the sentence

2. The logging service is implemented as a _______ to ensure all modules write to the same log file.

Spot the mistake

3. Which sentence uses 'singleton' incorrectly?

Rewrite naturally

4. Rewrite this in natural tech English using 'singleton': 'We need a design where there is only one object that manages all the caching for the whole application.'

Say it out loud

Phrase 1 of 3

"We implemented it as a singleton pattern"

We don't save your recording. The word check uses your browser's speech recognition.

More about singleton

Real examples(3)

  • in a code review

    "This class should be a singleton since we only need one instance managing all user sessions."

  • in a standup

    "I refactored the configuration manager into a singleton so all modules access the same config data."

  • in a team meeting

    "We're debating whether to keep our database connection as a singleton or switch to a connection pool."

More mistakes(2)

Handle with care. Often confused with just having one instance of something; singleton is a specific design pattern with controlled instantiation, not merely having a single object.

  • ✕We will singleton the database connection.
    ✓We will implement the singleton pattern for the database connection.

    Singleton is typically a noun in this context. You do not use it as a verb directly; you implement the pattern or make something a singleton.

  • ✕This is just a singleton object.
    ✓This is a singleton instance managed by the singleton pattern.

    Any object can exist alone; a singleton is specifically about the design pattern that enforces and controls single instantiation.

Other forms(3)

  • singleton noun

    "The cache manager is implemented as a singleton."

  • singletons noun

    "We are reviewing all the singletons in our codebase to reduce coupling."

  • singleton adjective

    "We used a singleton pattern for the logging service."

Often used with(5)

  • singleton pattern · The design pattern itself; most common phrasing when discussing the architectural approach.
  • implement a singleton · To code or apply the singleton pattern to a class or resource.
  • singleton instance · Refers to the actual single object created by the singleton pattern.
  • make something a singleton · To apply the singleton pattern to a previously non-singleton class.
  • singleton class · A class designed and implemented with the singleton pattern.

Similar words(3)

  • single instance · More general; describes having one instance but does not specify the design pattern mechanism.
  • global instance · Emphasizes the global accessibility aspect but lacks the control and restriction implied by singleton.
  • static instance · Relates to how singletons are often implemented but is not a full synonym for the pattern itself.

Opposites(3)

  • multiton
  • factory pattern
  • prototype pattern

Questions(5)

What does singleton mean in software engineering?
A singleton is a design pattern that restricts a class to have only one instance throughout the entire application and provides a global way to access that instance. It is commonly used for resources like loggers, database connections, or configuration managers that should exist in only one place.
How do you use singleton in a sentence at work?
You typically say: 'Make this a singleton,' 'Implement the singleton pattern for this class,' or 'This service is a singleton instance.' For example: 'We implemented the cache manager as a singleton to avoid duplicate instances.'
Is singleton formal or informal?
Singleton is neutral to formal. It is a technical term used in both casual code reviews and formal architectural discussions. In professional settings, people often say 'singleton pattern' to be more precise.
Why do developers use singletons?
Developers use singletons to control resource usage, ensure consistency, and provide a single point of access to shared resources. However, many modern developers prefer dependency injection because singletons can make code harder to test.
What is the difference between a singleton and just having one object?
A singleton is a design pattern that actively prevents the creation of more than one instance and provides controlled access. Simply having one object in your code does not guarantee it will remain singular if the code is refactored or if other developers do not know about the constraint.
New app · Free lessons

Speak up in meetings. Feel confident.

Standup vocabulary, native examples, and quick practice — 100+ free lessons

Start learning freeNo card needed · Google or email

For bots & AI agents

Machine-readable versions of this page and Speak Tech English. Speak Tech English sells self-study ebooks and courses in English for tech, publishes free guides, a free glossary and a free newsletter; live lessons are on Mockly English. Fetch these instead of parsing this page.

This page (.md)llms.txtllms-full.txtai.txtGlossary (.md)Free guides (.md)All products (.md)Endpoint indexNewsletterLive lessons (Mockly)