[swift-evolution] Object declarations
Brent Royal-Gordon
brent at architechies.com
Fri Dec 11 17:20:49 CST 2015
> -1. Enforced singletons lead to code that can't be unit-tested. Local types are occasionally convenient and they can't be unit-tested either, but spending one extra line to name the thing isn't going to hurt. You also can't pick an initializer here (at least not in this version).
I’ve also found lately that my singletons tend not to stay single; it usually turns out there’s some way to reuse them. -1 from me as well.
--
Brent Royal-Gordon
Architechies
More information about the swift-evolution
mailing list