News for hackers. Stuff that matters.
Re:Methods for Array Initialization in Rust (2018) by CryZe on Monday May 24, 2021 @12:01PM (#27265950)
There's also an open Pull Request for adding std::array::from_fn which calls the function / closure provided N times to initialize an array. This basically brings the array-init functionality into std.

https://github.com/rust-lang/rust/pull/75644

Re:Methods for Array Initialization in Rust (2018) by skohan on Monday May 24, 2021 @05:15PM (#27269812)
I wrote a graphics library in Swift that uses a method like this to initialize buffers and it's super useful