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

TRPL: new introduction #24239

Merged
merged 1 commit into from
Apr 11, 2015
Merged

TRPL: new introduction #24239

merged 1 commit into from
Apr 11, 2015

Conversation

steveklabnik
Copy link
Member

Now that the new TOC has landed, I've started doing an editing pass to get the old content into the right shape. I felt this introduction was significant enough to send as its own PR, though, as it's the introduction.

It's possible that we may just want to replace 'the intro' with this directly, but this PR doesn't do that.

@rust-highfive
Copy link
Collaborator

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

Rust. It has individual sections on each part of Rust's syntax.
* [Getting started][gs] - Set up your computer for Rust development.
* [Learn Rust][lr] - Learn Rust programming through small projects.
* [Effective Rust][er] - Higher level concepts for writing excellent Rust code.
Copy link
Contributor

Choose a reason for hiding this comment

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

s/Higher level/Higher-level/

Copy link
Member Author

Choose a reason for hiding this comment

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

nice catch, fixing

requirements, and writing low-level code, like device drivers and operating
systems. It improves on current languages targeting this space by having a
number of compile-time safety checks that produce no runtime overhead, but
eliminate all data races. These checks can be used to form ‘zero-cost
Copy link
Member

Choose a reason for hiding this comment

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

"but eliminate" -> "while eliminating"

Copy link
Member Author

Choose a reason for hiding this comment

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

nice catch, thanks

or ‘Syntax and Semantics’, depending on your preference: ‘Learn Rust’ if you
want to dive in with a project, or ‘Syntax and Semantics’ if you prefer to
start small, and learn a single concept thoroughly before moving onto the next.
Copious cross-linking will help connect these parts together.
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if this line is helpful.

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 think in general I'm a bit more verbose than you are in this. :)

Copy link
Member

Choose a reason for hiding this comment

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

This one will probably help some readers relax

Copy link
Member

Choose a reason for hiding this comment

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

The future tense sounds a little weird to me, maybe make it live in now more :P ("copious cross-linking connects these parts together"?)

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 like it

```rust
fn main() {
let x = vec![1, 2, 3];

Copy link
Member

Choose a reason for hiding this comment

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

I find these extra spaces ugly. Also, it's not what's going to happen in real code, and the differences are visible enough anyways. I'd rather you do this if you want emphasis:

fn main() {
    let x = vec![1, 2, 3];
    let y = &x[0]; // added
}

then

fn main() {
    let x = vec![1, 2, 3];
    let y = &x[0];
    x.push(4); // added
}

Copy link
Member Author

Choose a reason for hiding this comment

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

it's not what's going to happen in real code

If I were to write this code for real, I would put those spaces there. The principle is 'coding in paragraphs', each separate thing gets a newline. In more real code, there might be two or three things between each space, but I find your version to be quite cramped.


This chapter contains things that are only available on the nightly channel of
Rust.
```rust
Copy link
Member

Choose a reason for hiding this comment

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

Is this code example really worth the space in the brief intro? This seems like a case when space is at a premium and we want to make it as "tight" as reasonable. It seems to me that the paragraph above is probably all that's needed, or even reduced further with some cross-links to more explanations (Rust is statically typed but has type inference, so type annotations are [optional](...)).

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

@huonw
Copy link
Member

huonw commented Apr 9, 2015

(All my comments are meant to be discussion starters, I'm not rabidly in favour of any of them, just wondering if we could cargo doc --release a little. :P )

@steveklabnik steveklabnik force-pushed the editing_pass branch 2 times, most recently from 2be0873 to 90d6965 Compare April 9, 2015 23:38
@steveklabnik
Copy link
Member Author

I want to land this so that it gets into the nightly tonight. If there's any more nits, please open an issue and I'll just take care of it, but I don't want to have another day with the intro being just straight-up wrong. :)

@steveklabnik
Copy link
Member Author

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Apr 10, 2015

📌 Commit bf88539 has been approved by steveklabnik

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 10, 2015
…labnik

Now that the new TOC has landed, I've started doing an editing pass to get the old content into the right shape. I felt this introduction was significant enough to send as its own PR, though, as it's the introduction.

It's possible that we may just want to replace 'the intro' with this directly, but this PR doesn't do that.
bors added a commit that referenced this pull request Apr 10, 2015
Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 10, 2015
…labnik

Now that the new TOC has landed, I've started doing an editing pass to get the old content into the right shape. I felt this introduction was significant enough to send as its own PR, though, as it's the introduction.

It's possible that we may just want to replace 'the intro' with this directly, but this PR doesn't do that.

let y = x[0].clone();

x.push(4);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why push an integer to a vector of &str?

Copy link
Member Author

Choose a reason for hiding this comment

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

nice catch

Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 10, 2015
…labnik

Now that the new TOC has landed, I've started doing an editing pass to get the old content into the right shape. I felt this introduction was significant enough to send as its own PR, though, as it's the introduction.

It's possible that we may just want to replace 'the intro' with this directly, but this PR doesn't do that.
Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 10, 2015
…labnik

 Now that the new TOC has landed, I've started doing an editing pass to get the old content into the right shape. I felt this introduction was significant enough to send as its own PR, though, as it's the introduction.

It's possible that we may just want to replace 'the intro' with this directly, but this PR doesn't do that.
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 10, 2015
…labnik

Now that the new TOC has landed, I've started doing an editing pass to get the old content into the right shape. I felt this introduction was significant enough to send as its own PR, though, as it's the introduction.

It's possible that we may just want to replace 'the intro' with this directly, but this PR doesn't do that.
bors added a commit that referenced this pull request Apr 10, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 10, 2015
…labnik

Now that the new TOC has landed, I've started doing an editing pass to get the old content into the right shape. I felt this introduction was significant enough to send as its own PR, though, as it's the introduction.

It's possible that we may just want to replace 'the intro' with this directly, but this PR doesn't do that.
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 10, 2015
…labnik

Now that the new TOC has landed, I've started doing an editing pass to get the old content into the right shape. I felt this introduction was significant enough to send as its own PR, though, as it's the introduction.

It's possible that we may just want to replace 'the intro' with this directly, but this PR doesn't do that.
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 10, 2015
…labnik

Now that the new TOC has landed, I've started doing an editing pass to get the old content into the right shape. I felt this introduction was significant enough to send as its own PR, though, as it's the introduction.

It's possible that we may just want to replace 'the intro' with this directly, but this PR doesn't do that.
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 10, 2015
…labnik

Now that the new TOC has landed, I've started doing an editing pass to get the old content into the right shape. I felt this introduction was significant enough to send as its own PR, though, as it's the introduction.

It's possible that we may just want to replace 'the intro' with this directly, but this PR doesn't do that.
Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 11, 2015
…labnik

 Now that the new TOC has landed, I've started doing an editing pass to get the old content into the right shape. I felt this introduction was significant enough to send as its own PR, though, as it's the introduction.

It's possible that we may just want to replace 'the intro' with this directly, but this PR doesn't do that.
Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 11, 2015
@Manishearth
Copy link
Member

Needs 0a2885a

@bors bors merged commit bf88539 into rust-lang:master Apr 11, 2015
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.

8 participants