8

So I made my first rust program with just a quick look at the docs on for loops. 20 minutes from nothing to exe. Just fizz buzz but still. Took me 4 hours to get C++ compiling.

Comments
  • 2
    Well, most guides 'how to start with cpp' are crap and overcomplicated. Just apt install the gcc (maybe buildtools, cmake, etc) and you are ready to take off.

    How good is rust compared in binary size and speed compared to a 'native' cpp program?
  • 2
    @Emphiliis yes, getting started with C++ is as easy as installing g++ or any other compiler. But when projects get bigger, it does not scale so well. At some point you have to start fiddling with build systems, figure out how to get dependencies into your project and integrate some kind of testing into your project. That is all provided by cargo for Rust projects.

    As for performance, Benchmarks Game lists Rust's performance as roughly on par with C++. And I've read a blog post where Rust outperformed C by some amount. But for both sources only present a limited set of examples and your mileage may vary depending on a particular use case.

    https://benchmarksgame-team.pages.debian.net/...
    http://dtrace.org/blogs/bmc/...
  • 1
    @korrat for bigger projects I love cmake. But cmake can be quite complicated on its own. 😅 But still better than plain old makefiles.

    Thanks for the benchmark links.
Add Comment