Hacker News new | ask | show | jobs
by comex 1597 days ago
Rust already supports partially deinitialized structs - that is, moving out of a struct field by field - and there’s no fundamental reason it can’t support partial initialization too.

Indeed, there’s an open issue for it:

https://github.com/rust-lang/rust/issues/54987

But there are a lot of desired features with open issues, so don’t expect this to be implemented anytime soon unless someone takes an interest in it.

1 comments

Ah okay this makes sense. I wish I personally had the spare time to contribute this.