News for hackers. Stuff that matters.
Re:A Gentle Introduction to Rust by pjmlp on Thursday April 12, 2018 @05:45AM (#16819294)
Rust is better in that it enforces at language level best practices regarding memory use and thread safety, that are only possible in C++ via conventions or external tools like sanitizers.

C++ still wins down on available compilers, supported hardware and OSes, IDEs, debuggers, libraries, GUI tooling, SIMD, GPGPU, industry certifications for critical systems, ...

For example AUTOSAR just recently moved away from C to C++14 as suggested language for car computer systems, imagine how long it will take for them to suggest other language.

Re:A Gentle Introduction to Rust by RazrFalcon on Thursday April 12, 2018 @07:19AM (#16819672)
So nothing about ADT, pattern matching, modules, better std, explicit unsafe and cargo?
Re:A Gentle Introduction to Rust by pjmlp on Thursday April 12, 2018 @07:33AM (#16819756)
I skipped over modules, because Visual C++ and clang already have them in some form, it is a matter of getting them standardized in C++20.

Cargo is great, but C++ also has conan and vcpkg, eventually a standard one will emerge.

http://www.klabbers.nl/c/dependency-management-for-c/

Also I do have an issue with Cargo's lack of support for binary libraries.

ADTs, while not as good as in ML languages, at least there is std::variant.

I kind of mentioned explicit unsafe when I refereed to the safety enforced at language level instead of conventions and sanitizers.

Pattern matching is a great feature across all ML based languages, there were already some attempts to add it to the C++ as well.

http://open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0095r1....

https://www.youtube.com/watch?v=HaZ1UQXnuC8

Re:A Gentle Introduction to Rust by RazrFalcon on Thursday April 12, 2018 @08:07AM (#16819973)
Yes. C++ has all of this in a crippled form. But it doesn't mean that C++ in on par with Rust.
Re:A Gentle Introduction to Rust by pjmlp on Thursday April 12, 2018 @08:46AM (#16820275)
Not from technical perfection point of view, but it is much easier to improve existing codebases than just rewriting the world.

One of the things Rust should focus on as productivity improvement is making that migration as easy as possible.

Right now I cannot justify from business perspective replacing C++ with Rust on the workflows we still use C++ for.

Re:A Gentle Introduction to Rust by RazrFalcon on Thursday April 12, 2018 @10:56AM (#16821559)
I'm not saying that you should ditch an existing C++ project.

But it doesn't mean that C++ as good as Rust. It's just wrong.

Re:A Gentle Introduction to Rust by pjmlp on Thursday April 12, 2018 @01:25PM (#16823059)
A programming language is not just a grammar and semantics.

The whole eco-system and community around a language is what defines it.

To give a more explicit example, until it reaches parity with C++ on .NET/UWP tooling, it just means less productivity in spite of being a technically better and safer language.

Re:A Gentle Introduction to Rust by rapsey on Thursday April 12, 2018 @05:58AM (#16819345)
You did not list any steps backwards just that the ecosystem is less mature
Re:A Gentle Introduction to Rust by pjmlp on Thursday April 12, 2018 @06:47AM (#16819526)
Sure I did, lack of SIMD and GPGPU support for example.

If you prefer to be more specific, generics in Rust are still not as powerful as in C++, lacking const parameters and HKT, although they are coming.

Also compile time code execution is not yet supported, although quite a bit can be achieved with macros.

Re:A Gentle Introduction to Rust by steveklabnik on Thursday April 12, 2018 @09:26AM (#16820644)
Assuming nothing catastrophic happens in the next five days, https://github.com/rust-lang/rust/pull/49664 can be merged, by the way. So that'll be one thing off your list as of 1.27.