Comments (4)
Can you elaborate a bit more?
from newtools.
Each time we add a debugging tool, there is a class with a singleton that holds objects.
For example, the halt cache uses a registry of halts, the debugger selector keeps instances of DebugSession, the object-centric debugger keeps instances of object-centric breakpoints, etc.
Basically all the (debugging) tools need to keep instances of things somewhere and control them from there.
We are constantly adding singletons, with different namings (defaultInstance, default, singleton, etc.), then testing them (globally the same way).
Why not having a "Singleton service" that proposes an interface for "Singleton clients" that would be able to register their objects there?
from newtools.
Yes, one tiny step: There was the proposal to add a Stateful trait for Singletons.
- Konrad implemented it and changed all singletons, but it was rejected as a (undefined) part of that is not supposed to use Tratis
- I re-submitted the trait only so people can start to use it, but that was rejected as it had no users.
from newtools.
I understood @StevenCostiou 's point as to avoid singletons, not making them just easier to use. Singletons are in general not a good solution as they prevent testing, isolating changes...
from newtools.
Related Issues (20)
- Better class comment for MessageBrowserPresenter HOT 1
- MessageBrowserPresenter brows: #() raises an error #14401 HOT 1
- binding for mac is breaking playground HOT 1
- '#suspendedContext was sent to nil ' while proceeding HOT 2
- Dialog migration glitch in debugger HOT 1
- Navigating the debugger stack is super slow HOT 3
- self for number in inspector #14719 (https://github.com/pharo-project/pharo/issues/14719) HOT 1
- Spotter not opening minimized window
- Debugger: var duplication (and big slowdown) when executing a loop with "run to" action HOT 3
- expression finder didn't find expression HOT 2
- testUpdateExtensionSubscription is often failing on Pharo12 HOT 2
- NewTools-FileBrowser should not use StInspector but switch to StObjectInspectorPresenter
- StFBDirectoryFilterTest fails on Linux and simplifiations for hidden files HOT 4
- Simplify StFBVisibleFilter implementation HOT 1
- StFBDirectoryFilterTest fails HOT 1
- wrong project url in comment
- Remove ChangeSorter HOT 1
- Font family listing defaults to nil and prevents font chooser to open
- Debugger: changing to another method is very slow HOT 5
- Sorting values in the inspector HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from newtools.