[swift-users] [swift-dev] Initializing constant object graph with cycles

Dave Abrahams dabrahams at apple.com
Mon Nov 7 13:47:29 CST 2016


on Fri Nov 04 2016, Anton Mironov <swift-users-AT-swift.org> wrote:

> This workaround looks better, but it is still workaround.
> I can trust myself this month and month after that. But I will look at
> this code after a while (or someone else will look at it) and will not
> remember/know that there has to be some initializations.
> I am building tools that handle some common cases of synchronization
> and etc. These tools must be robust and beautiful so I can advice
> anyone to use them. None will adopt these tools if they introduce some
> new points of failure.

I hate to bring this up, but have you considered representing your graph
with value types?

-- 
-Dave



More information about the swift-users mailing list