Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
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? -
korrat6065y@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/... -
@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.
Related Rants
-
xjose97x19Just saw a variable in C named like this: long time_ago; //in a galaxy far away I laughed no stop.
-
Unskipp24So this happened last night... Gf: my favorite bra is not fitting me anymore Me: get a new one ? Gf: but it ...
-
sam966911Hats off to this lady .... I would have just flipped the machine
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.
rant
rust
c++