4 ms·
1. Could you give a few examples of libraries that can’t be made in Rust due to lack of abstraction compared to C++? I'm guessing, but I think that something l
by papaf 6y ago
1. Could you give a few examples of libraries that can’t be made in Rust due to lack of abstraction compared to C++?
I'm guessing, but I think that something like Armadillo[1] would not be possible on stable Rust. Something like Catch[2] might also difficult to make ergonomic.
I don't program in C++ anymore and I would personally live with the lack of expression/abstraction for a safer language though.
[1] http://arma.sourceforge.net/speed.html http://arma.sourceforge.net/speed.html
[2] https://github.com/catchorg/Catch2/blob/master/docs/tutorial.md#top https://github.com/catchorg/Catch2/blob/master/docs/tutorial...
- adamnemecek 6y agoWhy are they impossible in Rust? Are you aware of Rust's macros right?
- ncmncm 6y agoRust macros know nothing about types, but types are what do all the work at compile time.
- adamnemecek 6y agoDo they have to know about types?
- ncmncm 6y agoOnly to build designs that today are possible only in C++. Type-aware macros might not be the best way to implement the features needed to match C++.
- 0xFluegel 6y agoCan you elaborate on why Catch would be impossible or unergonomic? It's a test framework, right? Why would one even use it instead of the normal rust test framework? Also, how is it ergonomic? I'd agree if you say that it's (one of?) the best for C++, and it's also my go-to option, but ergonomic?