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

Further changes #6

Closed

Conversation

MajorBreakfast
Copy link

@MajorBreakfast MajorBreakfast commented Apr 24, 2018

  • A missing word 😇
  • Future -> Async
  • Various improvements

Rendered

@MajorBreakfast MajorBreakfast changed the title Fix typo Further changes Apr 25, 2018
@MajorBreakfast
Copy link
Author

Renamed Item to Output (mentioned by @alkis in rust-lang#2394 (review))

@MajorBreakfast
Copy link
Author

MajorBreakfast commented Apr 25, 2018

Don't merge yet, I want to add a commit that changes Future to Async Edit: Done

@MajorBreakfast
Copy link
Author

  • Renamed Future to Async
  • Consistent highlighting for async, await

@MajorBreakfast
Copy link
Author

MajorBreakfast commented Apr 25, 2018

Don't merge yet. I have concerns that we'll be happy with our choice if we choose the name Async.

@MajorBreakfast
Copy link
Author

MajorBreakfast commented Apr 25, 2018

As an experiment I've renamed Async to Task: Rendered

@MajorBreakfast MajorBreakfast force-pushed the async-await branch 6 times, most recently from 144f448 to 2b16621 Compare April 27, 2018 08:30
@MajorBreakfast
Copy link
Author

MajorBreakfast commented Apr 27, 2018

My naming effort didn't catch on 😅Async it is

Here's the updated PR which renames everything from Future to Async

@aturon

@MajorBreakfast MajorBreakfast force-pushed the async-await branch 8 times, most recently from 26f72d9 to 508dc63 Compare April 27, 2018 08:50
@MajorBreakfast
Copy link
Author

@aturon @withoutboats Any update on this?

Copy link
Owner

@withoutboats withoutboats left a comment

Choose a reason for hiding this comment

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

In addition to the few specific comments, I think the introduction of code blocks here is a stylistic downgrade that makes the RFC less readable. Backticks should be used for keywords when discussing the keyword and for traits when discussing the type, not any time they are used. Several prominent examples:

  • An async function is annotated with the async keyword, but that does not mean it should always be written "async function."
  • A return expression must evaluate to the return type of the function, but that does not mean that type should be referred to as the "return type".
  • A future is a type that implements Future, but that does not mean that you must always call them "Futures".
  • You can "await" a future using the await! keyword, but that doesn't mean you must always "await a future" (indeed, in this case, in this RFC, any time await should be backticked it should be written await!, since it is a built-in macro and not normal syntax.)

Backticks should only be used when they improve understanding by clarifying that we are referring to a particular piece of code, not to the concept that that code would also refer to.

I'm going to merge the RFC now, but feel free to make another PR against the RFCs repo and request my review to make any of the other amendments this PR contains.

anonymous type which implements `Future`. As that future is polled, the
function is evaluated up to the next `await` or return point inside of it (see
the await syntax section next).
`async` functions work differently than normal functions. When an `async`
Copy link
Owner

@withoutboats withoutboats May 8, 2018

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

Interesting. Didn't know that. (I'm from Germany ;)

reverse course after stabilizing these features, it will be quite costly.
Adding an alternative mechanism for asynchronous programming would be more
costly because this exists. However, given our experience with futures, we are
costly because this exists. However, given our experience with s, we are
Copy link
Owner

Choose a reason for hiding this comment

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

replaced "futures" with "s"

@MajorBreakfast
Copy link
Author

Yes I wasn't so sure about whether styling all these words as code is a good idea myself. I'll create create a PR that only contains the other tweaks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants