Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.31 announcement #295

Closed
wants to merge 16 commits into from
Closed

1.31 announcement #295

wants to merge 16 commits into from

Conversation

steveklabnik
Copy link
Member

A first draft.

r? @rust-lang/core

_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved

### Cargo features

Cargo will now download packages in parallel using HTTP/2. Additionally,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should state how much quicker this is, will follow up...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Up to 20x faster"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have these numbers? how reliable are they?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we have the detail. But I think they are reliable (the number is from a GH issue, so it must be true).

_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
July](https://blog.rust-lang.org/2018/07/27/what-is-rust-2018.html).
For some more background about the *why* of Rust 2018, please go read those
posts; there's a lot to cover in the release announcement, and so we're going
to focus on the *what* here.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: link to Lin's post here, for a graphic explainer of what Rust 2018 is all about.

previously rejected. Consider this example:

```rust
fn main() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should use, or at least mention, a more real example? Maybe we should just leave it for @nikomatsakis's post, though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A "mutate the original variable at the end of a match" example might be good. IMO That's one of the biggest pain points. Perhaps this example from the RFC?

fn process_or_default() {
    let mut map = ...;
    let key = ...;
    match map.get_mut(&key) { // -------------+ 'lifetime
        Some(value) => process(value),     // |
        None => {                          // |
            map.insert(key, V::default()); // |
            //  ^~~~~~ ERROR.              // |
        }                                  // |
    } // <------------------------------------+
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to stick to the simple example for now, unless we feel really strongly about it. There's a lot in this post already, and keeping it straightforward is more important than being hyper realistic, I think.

If people feel super strongly I'm willing to change it though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@steveklabnik I don't feel super strongly about this. But I'd like to point out that we're likely to get a fair number of people from outside the normal Rust community reading this, who might not have the context for why such a change is important/useful/interesting.

If you're worried about length, perhaps we could link out to a blog post or to the RFC instead of including a more realistic example in the post?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did link to the edition guide, which has the full details of everything; maybe we need another one?

_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved

* `extern crate` is no longer needed in 99% of circumstances.
* You can import macros with `use`, rather than a `#[macro_use]` attribute.
* Absolute paths begin with a crate name, where the keyword `crate` refers to the current crate.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe clarify: all paths in use statements

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not 100% sure what you're asking me to tweak.

* Absolute paths begin with a crate name, where the keyword `crate` refers to the current crate.
* A `foo.rs` and `foo/` subdirectory may coexist; `mod.rs` is no longer needed when placing submodules in a subdirectory.

These may seem like arbitrary new rules when put this way, but the mental
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels a bit underwhemling. I'm wondering if we can get across a bit more about why this is an improvement. For example, we could talk about how this eliminates the confusion around paths working differently at the top level module vs submodules.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was worried about the post being too long.... doing that adds a lot of length. I agree that it feels underwhelming though...


`const fn`s cannot do everything that normal `fn`s can do; they must
have deterministic output. This is important for soundness reasons.
Currently, `const fn`s can do a minimal subset of operations. Here's
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks accurate / what we said in the tracking issue / reference;
Are you looking for something specific?
cc @oli-obk

@aturon
Copy link
Member

aturon commented Dec 4, 2018

This post should call out all of the efforts in Rust 2018 -- after all, the idea was to package all of this work up into a big product release, covering all aspects of the Rust experience.

So, for example, we're missing:

  • Tooling (IDE support, rustfmt, Clippy)
  • Documentation (updated TRPL)
  • Domain working groups work (e.g. the books they've produced, stabilizations, etc)
  • New web site

I think it would also be valuable to repeat at least some of the core framing around what Rust 2018 is, and what this whole thing is supposed to mean to people.

@aturon
Copy link
Member

aturon commented Dec 4, 2018

We'll have follow-up posts for many of these topics, but it seems important to at least mention all of the work that people have put into Rust 2018, and giving a high-level picture of how this all adds up.

@sophiajt
Copy link
Contributor

sophiajt commented Dec 4, 2018

IMHO, this post feels very subdued compared to the amount of work that went into Rust 2018. I know there are other posts planned, but the release announcement is a natural place to celebrate all the hard work, to thank everyone that helped make it possible, to show screenshots of things like the new website, the new docs, to have a taste of what Rust 2018 will let you do in practice...

Basically, be excited about it! It's big news! 🍰

_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved

`const fn`s cannot do everything that normal `fn`s can do; they must
have deterministic output. This is important for soundness reasons.
Currently, `const fn`s can do a minimal subset of operations. Here's
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks accurate / what we said in the tracking issue / reference;
Are you looking for something specific?
cc @oli-obk

_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
@SimonSapin
Copy link
Contributor

SimonSapin commented Dec 4, 2018

I’m told this might be the place to point out that https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1310-2018-12-06 seems incomplete: there is no mention of the edition or of NLL for example.

@Manishearth
Copy link
Member

I can write copy for clippy if y'all need.

@nrc
Copy link
Member

nrc commented Dec 4, 2018

I can write copy for clippy if y'all need.

That would be awesome!

_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
@pietroalbini
Copy link
Member

You can change all the edition book links to point to stable: that book is being backported to the 1.31.0 release in rust-lang/rust#56518.

@CYBAI CYBAI mentioned this pull request Dec 5, 2018
@Manishearth
Copy link
Member

Manishearth commented Dec 5, 2018

Copy for clippy:

Clippy

Rust's linter, clippy, is now available on stable Rust. You can install it via rustup component add clippy and run it with cargo clippy.

Clippy is now considered 1.0, which carries the same lint stability guarantees as rustc. New lints may be added, and lints may be modified to add more functionality, however lints may never be removed (only deprecated). This means that code that compiles under clippy will continue to compile under clippy (provided there are no lints set to error via deny), but may throw new warnings.

Does this sound good? cc @nrc @oli-obk

@nrc
Copy link
Member

nrc commented Dec 5, 2018

Does this sound good?

Yes. Feedback:

I would have the rustup line as inline code, not para code to match cargo clippy.

In the first para, I would add a sentence about the number of lints, and/or some example lints, and say something about it being configurable so that people who haven't used it have more of an idea of what it does.

provided there are no lints set to deny

Might be worth expanding on this for people who are new to Rust

_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
_posts/2018-12-06.Rust-1.31.md Outdated Show resolved Hide resolved
@Manishearth
Copy link
Member

(updated copy)

all of the work we've been doing over the past three years together, and create
a cohesive package. This is more than just language features, it also includes

* Tooling (IDE support, `rustfmt`, Clippy)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Tooling (IDE support, `rustfmt`, Clippy)
* Tooling (Rustfmt, Clippy, IDE support)

@Mark-Simulacrum Mark-Simulacrum self-assigned this Dec 6, 2018
@steveklabnik
Copy link
Member Author

merged manually, thanks all!

@carols10cents carols10cents deleted the 1.31-announcement branch February 28, 2019 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.