I had totally forgotten what it says in "The book" about struct and class construction. It's basically that all fields are first initialized to either T.init or by using the field's initializer. That means the use of ref inside class or struct would be quite restricted:int globalVal; struct MyStruct { // ref int defaultInitRef; // Illegal: reference variables // can't be default initialized
But you can handle it like const members: you have to initialize these members in the ctor.