This is (for me) a common initialisation issue in Swift. You aren't able to use properties to calculate other properties until the type is fully initialised – which it can't be as you're still allocating values.
AFAIK you have to either make those variables lazy (which then makes the struct mutate when you access those variables, which can be a pain) or you set them in an explicit initialiser.
Post
Replies
Boosts
Views
Activity
Thanks for your response. There are so many hidden rocks under the surface of technology that take a lifetime to discover.
I would be interested in hearing what tools are available. Even the ones I know about in instruments overwhelm me in detail and I can't imagine what usable information there could be in the haystack of stochastic simulations over multiple cores.
I think I'll experiment with shifting where the concurrency occurs in my simulation (e.g. whether it's better to have two independent tournaments simulated in parallel, or have one simulation with matches "playing" at the same time) and see what I discover.
I note that it is listed as a "known issue" in beta 3. That could mean it inadvertently stopped working with this release. A major intentional change like that would be surprising in a beta version update. You'd imagine it to have happened going from 13->14b1.