News for hackers. Stuff that matters.
Re:Rust: A Critical Retrospective by iopq on Sunday May 29, 2022 @10:31PM (#31554965)
It's just hard to parse

    fn apply<A, B, C, G>(mut f: impl FnMut(B) -> G, a: A) -> impl FnMut(&B) -> C
    // must still be `for<'r> impl FnMut(&'r B) -> C`, because that’s what filter requires
    where
        G: FnMut(A) -> C,
        B: Copy, // for dereferencing
        A: Clone,
    {
        move |b| f(*b)(a.clone()) // this must do any bridging necessary to satisfy the requirements
    }

I wrote this code myself, and it's SLOW for me to read. Each part isn't hard, it's just too much crap

There are no comments on this comment yet.