3 ms·
Is the syntax really that much of a burden? I don't have a perfect grasp of the syntax and would have trouble if I was having to write rust code with zero refer
by cortesoft 4y ago
Is the syntax really that much of a burden? I don't have a perfect grasp of the syntax and would have trouble if I was having to write rust code with zero reference, but as long as I have other rust code open it is pretty easy to remember what each part does.
- iopq 4y agoIt'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