Idea: Built-in support for "singleton" objects #55

Open
opened 2025-12-29 15:23:15 +01:00 by adam · 2 comments
Owner

Originally created by @JohnEstropia on GitHub (May 9, 2016).

Originally assigned to: @JohnEstropia on GitHub.

Entities that only ever need one instance come up a lot in the apps I've worked on.

Main functionalities:

  • global way to lazy-fetch an instance (maybe CoreStore.singleton[MyEntity])
  • wrap an ObjectMonitor for free notification handling
Originally created by @JohnEstropia on GitHub (May 9, 2016). Originally assigned to: @JohnEstropia on GitHub. Entities that only ever need one instance come up a lot in the apps I've worked on. Main functionalities: - [ ] global way to lazy-fetch an instance (maybe `CoreStore.singleton[MyEntity]`) - [ ] wrap an ObjectMonitor<T> for free notification handling
adam added the enhancement label 2025-12-29 15:23:15 +01:00
Author
Owner

@brosnic commented on GitHub (Jul 7, 2017):

Is this on your roadmap soon? I'd love to use that feature 👍

@brosnic commented on GitHub (Jul 7, 2017): Is this on your roadmap soon? I'd love to use that feature 👍
Author
Owner

@JohnEstropia commented on GitHub (Jul 11, 2017):

@brosnic Sorry for the long reply, I havent gotten around to implementing this yet. I'm currently prioritizing a new querying syntax for Swift 4 right now. That said my needs for this feature hasnt changed as well.

@JohnEstropia commented on GitHub (Jul 11, 2017): @brosnic Sorry for the long reply, I havent gotten around to implementing this yet. I'm currently prioritizing a new querying syntax for Swift 4 right now. That said my needs for this feature hasnt changed as well.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#55