On Sunday, 22 October 2023 at 23:49:40 UTC, Paul Backus wrote:
Nested structs contain a context pointer that needs to be initialized at runtime. If you don't initialize them, the pointer gets set to `null`, and the struct will not be able to access its context.

I see, thanks for the explanation.

Using `.init` doesn't fix this because `.init` is determined at compile time, and also has `null` in place of the context pointer.

In my case, it makes sense to not initialize the object, so this isn't an issue. Void-initialization would probably be better to document my intent, but the compiler won't let me do that.

Reply via email to