Actually, Brent’s solution is quite satisfactory.

It is slightly more heavy on the syntax, but I couldn't agree more that 
changing the language should be about more than mere syntactic sugars. Swift is 
already quite furnished in that department ;)

Thanks for your time.

Best,
Dimitri

PS: I do think the use case can actually be more common than one could think. 
This pattern is heavily used in Python, and considered a good practice to avoid 
global variables.

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to