Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: