Hacker News new | ask | show | jobs
by RazrFalcon 2984 days ago
So nothing about ADT, pattern matching, modules, better std, explicit unsafe and cargo?
1 comments

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

Yes. C++ has all of this in a crippled form. But it doesn't mean that C++ in on par with Rust.
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.

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.

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.