Skip to content

Conversation

jkleint
Copy link

@jkleint jkleint commented Oct 20, 2014

Explain the primary disadvantage of garbage collection is runtime
overhead and unpredictable pauses. Elucidate where the name "race
condition" comes from. Emphasize that Rust can guarantee your code is
free of race conditions and other memory errors, with no runtime
overhead.

cc @steveklabnik

src/doc/guide.md Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make this 'which is called', please?

@steveklabnik
Copy link
Contributor

Thank you! Just one or two little nits.

Explain the primary disadvantage of garbage collection is runtime
overhead and unpredictable pauses.  Elucidate where the name "race
condition" comes from.  Emphasize that Rust can guarantee your code is
free of race conditions and other memory errors, with no runtime
overhead.
@jkleint jkleint force-pushed the guide-borrow-wording branch from 4f07eff to f0b7065 Compare October 21, 2014 13:10
@jkleint
Copy link
Author

jkleint commented Oct 21, 2014

Good point! Here you go.

@alexcrichton
Copy link
Member

r? @steveklabnik

@steveklabnik
Copy link
Contributor

I am on mobile so this will get screwed up, r=me

bors added a commit that referenced this pull request Oct 25, 2014
Explain the primary disadvantage of garbage collection is runtime
overhead and unpredictable pauses.  Elucidate where the name "race
condition" comes from.  Emphasize that Rust can guarantee your code is
free of race conditions and other memory errors, with no runtime
overhead.

cc @steveklabnik
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 this is correct (cc @nikomatsakis).
"Lifetime errors" come from regionck, which infers appropriate lifetimes and enforces their coherence.
The borrowck produces, well, borrow errors.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it is particularly important to be too pedantic about the internal compiler passes, but maybe this sentence could be rephrased to just "it will report an error and your program will refuse to compile".

Copy link
Member

Choose a reason for hiding this comment

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

Well, they are two different compiler passes because they have different jobs, and produce different errors.
Calling borrow errors "lifetime errors" is plain wrong, AFAIK they don't even mention lifetimes, the only conceptual link is that borrows are determined by lifetimes.
And it propagates the misconception that the borrow checker assigns lifetimes or gives errors about them - does not help explaining errors or tracking them down at all.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it is particularly important to be too pedantic about the internal compiler passes, but maybe this sentence could be rephrased to just "it will report an error and your program will refuse to compile".

Agreed.

@bors bors closed this Oct 25, 2014
@bors bors merged commit f0b7065 into rust-lang:master Oct 25, 2014
@jkleint jkleint deleted the guide-borrow-wording branch October 26, 2014 20:36
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Oct 27, 2014
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.

7 participants