News for hackers. Stuff that matters.
Re:Rust 1.34.0 by steveklabnik on Thursday April 11, 2019 @03:26PM (#19638235)
It’s partially that, it’s partially that systems people are very conservative, and it’s partially Rust’s own history before 1.0. People do view major breaking changes very differently these days due to those specific situations, and some people still think Rust changes daily. Systems languages tend to have a stability timeline of “forever.”

Rust does have a strong commitment to safety, but not an absolute commitment to correctness. These things happen very infrequently. Is it really worth taking an extreme action (which a major language version bump is, especially in the systems space) just to turn a few warnings into errors? Currently, we don’t think so. Maybe in 20 years, when (And if! :) ) there is more than one standard library API that suffers this problem, it would be worth it, but at the current time, it just doesn’t seem to make sense.

Re:Rust 1.34.0 by nixpulvis on Thursday April 11, 2019 @05:48PM (#19639601)
I personally feel like this falls clearly into the soundness hole catagory and should be allowed to be removed in a breaking way. I understand the desire to avoid breaking changes, but soundness issues like this chip away at what "safety" in Rust really means.

I think I'd expect to see warnings about the existing safe method being deprecated for a while, then it's complete removal at the time of another edition of Rust. Users of older versions of Rust can still use the removed function, but newer editions ban it.

This could be implemented as a reserved STD function list in the compiler if it must, since as you've mentioned we only have one STD lib atm.

Re:Rust 1.34.0 by steveklabnik on Thursday April 11, 2019 @05:53PM (#19639648)
Yes, as I said below, this is technically a thing we’re allowed to remove. Maybe someday we will. But we want to be careful.

Editions cannot make this kind of change, as also discussed below.

Re:Rust 1.34.0 by nixpulvis on Thursday April 11, 2019 @06:03PM (#19639728)
I think it could be an edition thing though... just say Rust 2019 will not allow `Command::before_exec`. By turning on edition 2019 you've accepted the new brakages that it imposes on you, and this is one of them.

Never mind the fact that the function is still a symbol in the STD library.

I understand if this is too much complier magic, though it seems like the correct idea to me anyway.

Am I missing something?

P.S. symbol version pinning seems like a great idea, I've even dreamt of having exposed syntax for it, e.g. `Foo::<i32>::[email protected](arg1, arg2)`.

Re:Rust 1.34.0 by steveklabnik on Thursday April 11, 2019 @06:20PM (#19639856)
Please see the discussion below; I already discussed this at length :)
Re:Rust 1.34.0 by nixpulvis on Thursday April 11, 2019 @08:05PM (#19640584)
Just so I'm clear, are you saying then that it's not possible or desireble to have Rust 201X code link against Rust 201Y STD? Or would that work?

Sorry if I'm not making my thought very clear.

Re:Rust 1.34.0 by steveklabnik on Thursday April 11, 2019 @08:44PM (#19640834)
It is not possible to have the standard library be different for different editions; it must be the same in all of them. There’s no #[cfg(edition=“”)] construct.
Re:Rust 1.34.0 by hyperman1 on Friday April 12, 2019 @07:10AM (#19643748)
Can't there be a # [deprecate(untiledition=2018)] to solve this? The standard library contains all the old stuff but it becomes inaccessible in all editions after 2018.
Re:Rust 1.34.0 by steveklabnik on Friday April 12, 2019 @07:58AM (#19643987)
There can not.
Re:Rust 1.34.0 by nixpulvis on Thursday April 11, 2019 @09:26PM (#19641089)
Gotcha, thanks for taking the time to explain.

I hope I didn't come off as being to negative about the change. Warnings are still a pretty good solution here.

Re:Rust 1.34.0 by steveklabnik on Thursday April 11, 2019 @11:01PM (#19641572)
It’s all good!
Re:Rust 1.34.0 by gbear605 on Thursday April 11, 2019 @03:42PM (#19638380)
Would it be reasonable to introduce a compiler flag that is enabled by default to mark this category of warnings as errors, or would even that need a major version bump?
Re:Rust 1.34.0 by steveklabnik on Thursday April 11, 2019 @03:48PM (#19638436)
It’s not really feasible. Maybe in an extreme case, but this just isn’t one. We have done this for fixing language soundness holes, but it is extremely rare. The spirit of the law matters as much, if not more, than the letter.
Re:Rust 1.34.0 by Buttons840 on Thursday April 11, 2019 @03:46PM (#19638417)
Re:Rust 1.34.0 by steveklabnik on Thursday April 11, 2019 @03:50PM (#19638459)
It’s a policy question, not a technical question. We can absolutely do it technically.