3 ms·
The comments on the article page (not here) show that the commenters are not reading the article carefully. This is a scrupulously written article with deeply
by ncmncm 8y ago
The comments on the article page (not here) show that the commenters are not reading the article carefully.
This is a scrupulously written article with deeply meaningful conclusions. Rust is an immature language -- a stage every language goes through! -- and you can tell. What no one knows, yet, is whether its designers have painted themselves into a corner that prevents fixing it. The compiler, too, is immature, and will certainly get better at localizing the causes of problems, but that is a research project.
C++ is legitimately criticized for complexity that comes from its complicated history. It inherited all of C's warts, and more from early experiments that didn't pan out. You can mostly avoid most of them, but promiscuous integer conversion and overflow always lurk, and you never know when you will encounter old-school code that revives the old monsters.
Rust claims benefits from not inheriting legacy hacks (except C linking conventions, which affect function call details), but is rapidly growing its own legacy of past design choices that constrain future choices. The only limits on this problem are foresight and mathematical rigor of design formalisms, and both are limited.
It might be that Rust programmers will need to learn to rely less on type inference, and state types "unnecessarily", just to get understandable error messages. Improvements in the compiler might include its identifying choke points where such a type annotation would help.
Modern C++ coding gives much the same experience of spending extra time satisfying the compiler, then the program mostly works when you do; but the error messages don't take hours to figure out. Usually, the most obscure complaints come out as mismatches between long function-and-template argument lists, where you have to pick out the one word that doesn't match, but these take minutes, not hours, and could be automated without a research project. Much of that will disappear (not all!), with Concepts in C++20.
The difference between the C and C++/Rust experiences is very much like the difference with interpreted languages -- you depend a great deal more on exhaustive testing when the compiler does less.