by coder543 · 7y ago · 0 comments
In the article linked by this discussion, the author specifically mentions how fields can’t be moved out in D’s implementation.
Option is the correct approach for dealing with information that might be missing, but that’s not really related to partially moved structs.
Structs document what is available in a given value, to both the compiler and to you. If that’s not convincing, then I’m not going to try more here... it’s off topic. But I will say you can use maps in Rust or other statically typed languages. They’re just not meant to be an alternative to well-defined structs.