3 ms·
>> The template libraries are heavily biased towards closure-oriented functional programming. > No, they aren't. I think that came off more combative than you
by oconnor663 10y ago
>> The template libraries are heavily biased towards closure-oriented functional programming.
> No, they aren't.
I think that came off more combative than you meant it to :)
>> Parts of expressions are nameless and have no visible type.
>Are you thinking of unboxed closures here?
I think Animats is complaining about the functional style in general, which is at least more common in Rust than in C++ or Python. And if that's right, it's a complaint I mostly agree with. Functional programming can cram quite a bit into one line, and that's all well and good, but a lot of the savings comes from omitting the variable names that are usually there in imperative code, and some clarity gets lost when you don't name things.
I agree with your rule of thumb. Functional stuff is great when what it's doing is obvious.
- pcwalton 10y ago> a lot of the savings comes from omitting the variable names that are usually there in imperative code, and some clarity gets lost when you don't name things. Are you talking about point-free style? Point-free style is rare in Rust, partially by convention, partially due to the fact that references and values are different and often you need to wrap in a closure to convert one to the other.