3 ms·
Rust has rather sophisticated macros, which let you do stuff like this outside the core language implementation, which is IMO very much where such things belong
by Groxx 5y ago
Rust has rather sophisticated macros, which let you do stuff like this outside the core language implementation, which is IMO very much where such things belong.
E.g. a linq clone in rust can look like this: https://github.com/StardustDL/Linq-in-Rust https://github.com/StardustDL/Linq-in-Rust
linq!(from p in 1..100, where p <= &5, orderby -p, select p * 2).collect();