"Every feature you have in C++, Rust does it better"
How does one perform generic fold expressions in Rust lang ? (Possible in C++ 17 and above)
https://foonathan.net/2020/05/fold-tricks/ https://en.cppreference.com/w/cpp/language/fold
Re:Rust in the Android Platform
by pixel_fcker on Wednesday April 07, 2021 @05:27AM
(#26722284)
Macros baby
AFAIK, macros are only applicable to a subset of problems. Anyways, I found that variadic generics is a draft RFC: https://github.com/rust-lang/rfcs/issues/376
>Every feature you have in C++, Rust does it better.
IDK. I miss variadic functions (not macros) and being able to do certain simple things without resorting to strange paradigms, like arbitrarily closing an std::fs::File without needing to go out of scope or calling drop. Things like that.
Re:Rust in the Android Platform
by 3836293648 on Wednesday April 07, 2021 @12:10PM
(#26726959)
How is calling drop any different from calling close?
For the practical case is not different. But is not coherent. It’s weird. And opening/closing files is an historical concept.
Why “drop” is the opposite of “open”? Let’s change “open” for “lift” or “notdrop”.
I'm not even going to say why because it would be a huge rant. It improves on C++ in virtually every way. Every feature you have in C++, Rust does it better. Every feature you wish C++ had, Rust has it.
I agree with you on Kotlin. It's better than Java on paper, but in much the same ways Groovy already was. And the advantages are shrinking in new versions of Java, especially if you use Lombok.