Skip to content

Cleanup lifetime and pointer guides #14387

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

Merged
merged 3 commits into from
May 28, 2014

Conversation

alan-andrade
Copy link
Contributor

My main goals were:

  • be clear when we talk about "references" and "pointers"
  • remove Managed boxes completely and the concept of GC.

#13987

Clean pointers guide
copied. For points, this is probably not so bad, but often copies are
two points, no matter where they were stored. One option is to define a function
that takes two arguments of type `Point`—that is, it takes the points __by value__.
But if we define it this way, calling the function will cause the points __to be
Copy link
Member

Choose a reason for hiding this comment

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

Don't use emphasis around here, it's distracting.

@emberian
Copy link
Member

Thanks for doing this! Clean docs are really important.

@alan-andrade
Copy link
Contributor Author

ready for a second review.

@emberian
Copy link
Member

Comments from someone on IRC:

<anon>  (region pointers),
<anon>  usually introduced as (e.g. region pointers)
<anon>  (or some other latin thing)
<anon>  Therefore, the best way to explain how
<anon>  i'd drop Therefore
<anon>
<anon>  point to, instead, they
<anon>  run-on-y
<anon>  point to. Instead, they might be better
<anon>
<anon>  As an example, consider a simple struct type  Point : drop as an example
<anon>  drop many of those phrases
<anon>  im seeing a lot
<anon>  but if you really wan t one, "In the following code" or similar is better
<anon>
<anon>  In order to convert  Box<T>  into a  &T , we need to use  &* .
<anon>  might that be better broken up into the two operations?
<anon>  if it even is
<anon>  I imagine that you would first deference(whatever it is)
<anon>  then take the address of
<anon>  new users might mistakenly think of that as one operation
<anon>  and if it is, then its fine
<anon>
<anon>  the other uses for the & operator section is ehhhhh
<anon>  under borrowing and enums
<anon>  everyone might not know what tau is
<anon>  might want to put it before the code
<anon>
<anon>  if you borrow a structs or boxes to create a reference,
<anon>  that pluralization/possessivation is wrong

@@ -294,7 +201,7 @@ and `x` is declared as mutable. However, the compiler can prove that
and in fact is mutated later in the function.
Copy link
Contributor

Choose a reason for hiding this comment

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

GitHub won’t let me comment on it, but four lines up (line 290/197) it reads ‘Here, as before, the interior of the variable x…’. That previous section was removed, so you should probably remove the ‘as before’ part.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ohhh, nice catch! thanks

@alan-andrade
Copy link
Contributor Author

Ready for a third review.

bors added a commit that referenced this pull request May 28, 2014
… r=brson

My main goals were:
- be clear when we talk about "references" and "pointers"
- remove Managed boxes completely and the concept of GC.

#13987
@bors bors closed this May 28, 2014
@bors bors merged commit 0cae849 into rust-lang:master May 28, 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.

5 participants