News for hackers. Stuff that matters.
Re:I can't keep up with idiomatic Rust by phkahler on Wednesday April 08, 2020 @10:44PM (#22819327)
Stability is THE most important feature. Rust needs to mature a little more and then mostly just stop. I seriously hope that it doesnt follow the C++ path.
Re:I can't keep up with idiomatic Rust by steveklabnik on Thursday April 09, 2020 @12:01AM (#22819661)
Rust has made very strong stability guarantees.

Just today someone posted in /r/rust about how they took a two year old project, compiled it with the latest compiler, no issues. Other than it magically took less time to compile and the end result ran faster.

Re:I can't keep up with idiomatic Rust by jgon on Thursday April 09, 2020 @01:12AM (#22819972)
This is a pretty complete misunderstanding of what the previous commenter was saying. You can probably find 20+ year old C++ code that will compile just fine with the latest compiler and it will take less time to compile and the end result will run faster. But that's not what people are complaining about when they talk about C++'s ever growing scope and the insanity of trying to cope with the 1001 ways of doing something in the language.

I have it straight from the horse's (Bjarne's) mouth that there will be no more editions of "The C++ Programming Language" because the language is too big and writing a book too time consuming to actually cover the language as it currently exists and what it is going to become. It's own creator admits that the language is too big to document in book form. How does one ever expect a beginner to get to grips with it in that case!?!

Obviously Rust isn't there as it doesn't have 30 years of evolution and development like C++ does. But the rate at which it is growing and changing means it won't actually take 30 years to become the new C++. And that would be a real tragedy. What's the use of all these awesome safety features if they're in a language almost no one will be able to fully comprehend or understand?

Re:I can't keep up with idiomatic Rust by steveklabnik on Thursday April 09, 2020 @01:21AM (#22820025)
The parent made two claims, I only responded to one of them. You seem to think I responded to the other one. I'm sorry for not being more clear about that!

> But the rate at which it is growing and changing means it won't actually take 30 years to become the new C++.

I very, truly, seriously doubt this is true. First of all, as I said elsewhere in the thread, Rust has been changing very slowly lately. But beyond that, a significant reason for C++'s complexity is that it's sort of two, possibly three different languages: Modern C++ is very different than C with Classes. It is a miracle that they retrofitted a new language on top of an old one, but there's no indication that Rust will ever do that. The quantity of change is one thing, but the qualitative aspects matter here too, and I feel like you're only considering the quantitative aspect (which, I also disagree with, to be clear.)

Re:I can't keep up with idiomatic Rust by DeathArrow on Thursday April 09, 2020 @01:33AM (#22820084)
Why do you have to fully understand a very complex system to work with it? Isn't it enough to understand a part that enables you to do your job?
Re:I can't keep up with idiomatic Rust by baq on Thursday April 09, 2020 @09:04AM (#22822115)
20 year old C++ has absolutely no chance to compile with a modern compiler unless it has a compatibility option for 20 year old C++ and you know how to enable it. i've had to fix 2 year old code when upgrading gcc.
Re:I can't keep up with idiomatic Rust by UncleMeat on Thursday April 09, 2020 @10:34AM (#22822905)
What breaking changes have gone in since 2000 that didn’t break a change added after 2000?

Auto is the only one I can think of.

Re:I can't keep up with idiomatic Rust by steveklabnik on Thursday April 09, 2020 @10:44AM (#22822993)
When were trigraphs added?

(I am just curious, I have no idea how common your parent's comment is in real life.)

Re:I can't keep up with idiomatic Rust by kelnos on Friday April 10, 2020 @01:03AM (#22830131)
Pretty sure gcc doesn't enable trigraphs unless you pass a command-line option to do so (and maybe it's included in -std or -ansi or something like that).
Re:I can't keep up with idiomatic Rust by baq on Thursday April 09, 2020 @05:02PM (#22827164)
i've had issues with templates, but please forgive me if i don't provide specifics because it was ages ago. i've stopped doing C++ long before auto was even proposed so can't comment on that.
Re:I can't keep up with idiomatic Rust by Fordec on Thursday April 09, 2020 @01:06AM (#22819938)
Two years is nothing, absolutely nothing, in the grand scheme of "long term".
Re:I can't keep up with idiomatic Rust by steveklabnik on Thursday April 09, 2020 @01:14AM (#22819986)
That's correct. Rust is still a pretty young language; it's only been stable for five years. This doesn't mean that two years is meaningful in a broader sense, that is, this is one random anecdote. I know of a crate that still maintains Rust 1.13 compatibility, and that's about three and a half years. Still not actual evidence, of course.

Code that doesn't rely on soundness bugs written in 1.0 should generally compile on the latest stable release without issue. The vast majority Rust users in our annual survey report that their code never breaks, and of those that have, the majority have said that it is trivial or easy to fix.

We put a tremendous amount of work (and spend a lot of money!) into ensuring this. If upgrading your Rust compiler is a significant issue for you our anyone else, please report these things to us.

Re:I can't keep up with idiomatic Rust by Fordec on Thursday April 09, 2020 @11:57PM (#22829856)
It is indeed a young language.

Upgrading my compiler isn't an issue. I haven't opted to transitioning to Rust at all in the first place until things calm down. I've yet to feel that my career has once ever been impacted by not learning it.

I'm in hardware land, not JavaScript frontends. Innovation there is more about the product features, sensor capabilities, power consumption. Generally solving customer issues.

Selling adoption of a new language to the superiors or new job interviewers to use in production isn't an issue about compiler upgrades or the merits of using cargo fix. They are more concerned about how many people are available to be hired that has extensive expertise in the language, making hiring hard, and support is still in flux. And that is what I'm reporting, tooling is more than about the compiler, the world around it and human issues, particularly non-technical humans are also at hand.

And until there is stability and a language people don't feel is a moving target to learn, that will remain the chicken and egg scenario.

Re:I can't keep up with idiomatic Rust by steveklabnik on Friday April 10, 2020 @12:11AM (#22829906)
We’ll just see :)
Re:I can't keep up with idiomatic Rust by WilliamEdward on Thursday April 09, 2020 @02:21AM (#22820268)
Actually it's approximately 20% of rust's total time on earth. That's very long, relatively speaking.