Originally posted by Steffo
View Post
Announcement
Collapse
No announcement yet.
C++17 Is Near, A Look At The New Features
Collapse
X
-
Not having modules is just painful.
Refactoring is tedious, precompiled headers is just working around the compiler. No package manager for C++, it has a lot of catching up to do. Unfortunately, there is no language closer to C++. I thought D could have been the one, but it looks like they are driving away from the C++ crowd.
- Likes 1
Comment
-
Originally posted by swoorup View PostNot having modules is just painful.
Refactoring is tedious, precompiled headers is just working around the compiler. No package manager for C++, it has a lot of catching up to do. Unfortunately, there is no language closer to C++. I thought D could have been the one, but it looks like they are driving away from the C++ crowd.Last edited by cen1; 06 March 2017, 12:20 PM.
- Likes 1
Comment
-
Originally posted by cen1 View Post
Linux has it much easier in a sense that you can usually provide all dependencies straight out of package manager. Good luck finding binaries and compiling on Windows from source tho, now that is a PITA. I once had to compile OpenSSL with VS 2015 and XP compatibility profile. Don't ask..
Comment
-
Originally posted by discordian View PostDunno, but the constant nonsensical hype comparing it to 30 years old C is bugging me.
Compared to C++, Rust is able to deliver superior versions of the same features that C++ has, with less overhead, and significantly reduced chances of shooting yourself in the foot; and to do that while providing more critical features (Cargo, Rustup, Traits), and better defaults (faster vectors, move semantics, immutable by default), while heavily embracing the functional paradigm where functional programming does best. If C++ were re-created today from scratch, it would be Rust.
In the end, you'll just end up as all other C++ programmers: fleeing from C++ to Rust because Rust offers safety, speed, and features that you could never get with C++.
- Likes 1
Comment
-
Originally posted by mmstick View Post
C++ produces code that is slower than C, while Rust regularly produces code that is on par with C. By the end of the year, Rust should easily be competing against Fortran because the borrowing and ownership model allows Rust to avoid pointer aliasing by default, but this optimization is pending on the MIR compiler frontend.
- Likes 5
Comment
-
Originally posted by carewolf View PostBullshit. Everything in Rust is inspired by C++ best practices. Good C++ is as fast or slightly faster than C (due to stronger aliasing rules the compiler can use), because C++ use the concept of zero-overhead abstractions, the very same idea inspired Rust to make a modern language that could be as fast as C++ by using the same language guidelines, but starting from scratch with a modern basis and delegating the legacy stuff to foreign bindings.
- Likes 1
Comment
-
C++ can also be slower than C when people run their compiler with "safe" optimization levels. C code can be hand optimized to compile to good machine code without high optimization levels. That's much more difficult for C++. The solution is to write good tests and go ahead and use GCC's -O3, or whatever your compiler's maximum level is.
C++ code needs heavy inlining and devirtualization and LTO. Performance guided optimization helps too, although that is also great with C code.
Comment
-
Originally posted by cen1 View Post
Linux has it much easier in a sense that you can usually provide all dependencies straight out of package manager. Good luck finding binaries and compiling on Windows from source tho, now that is a PITA. I once had to compile OpenSSL with VS 2015 and XP compatibility profile. Don't ask..
Comment
Comment