3 ms·
It is true that currying looks comparatively awful in Rust. But that is not because Rust uses parentheses and commas. A hypothetical C-style language could use
by nequo 4y ago
It is true that currying looks comparatively awful in Rust. But that is not because Rust uses parentheses and commas. A hypothetical C-style language could use dedicated syntax for currying, like
some_long_ass_function_name(some_quirky_parameter, ..)
which would be more readable without giving up on punctuation.
- ackfoobar 4y agoScala does that, with `_` being a "hole in the expression". I wouldn't call it currying though. func(param1, _) Every once in a while you have to make some change to that expression. // you may want to write func(param1, func2(_)) // but you need to write the full lambda param2 => func(param1, func2(param2))