Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Additional FAQ answers #394

Merged
merged 13 commits into from
Jun 7, 2016
Merged

Additional FAQ answers #394

merged 13 commits into from
Jun 7, 2016

Conversation

alilleybrinker
Copy link
Contributor

I've added answers for a number of questions, including some mentioned in #248, #262, and #284. There are still some questions left to be answered, but I figure this is a good start.

r? @brson

@brson
Copy link
Contributor

brson commented Jun 1, 2016

OMG awesome.

"Feature gates" are attributes that enable the usage of unstable language
features. They can only be activated on the nightly channel, and allow
developers to opt into experimental features before they are stabilized.
Feature gates follow the same stabilization procedure as the standard library.
Copy link
Contributor

Choose a reason for hiding this comment

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

"nightly channel" -> "nightly release channel" please.

I think this is a little unclear because it implies that only language features are feature-gated, and "follow the same stabilization procedure as the standard library". But both language and library features are feature-gated. Feature-gating is the rust stabilization mechanism.

Some alternate ideas for text:

"Feature gates" are the mechanism Rust uses to stabilize features of the compiler, language, and standard library. A feature that is "gated" is accessible only on the nightly release channel, and then only when it has been explicitly enabled through #[feature] attributes or the -C unstable-options command line argument. When a feature is stabilized it becomes available on the stable release channel, and does not need to be explicitly enabled. At that point the features is considered "ungated". Feature gates allow developers to test experimental features while they are under development, before they are available in the stable language.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That text is better. Thanks!

@brson
Copy link
Contributor

brson commented Jun 1, 2016

cc @rust-lang/libs @rust-lang/lang new faqs that you may have opinions on.

@@ -498,7 +540,7 @@ fn main() {
What is the difference between passing by value, consuming, moving, and transferring ownership?
</a></h3>

These are different terms for the same thing. In all cases, it means the value has been moved to another owner, and moved out of the possession of the original owner, who can no longer use it.
These are different terms for the same thing. In all cases, it means the value has been moved to another owner, and moved out of the possession of the original owner, who can no longer use it. If a type implements the `Copy` trait, the value will be copied rather than moved, and so the original owner can continue to use the value.
Copy link
Member

Choose a reason for hiding this comment

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

"copied rather than moved" is potentially misleading since moves generally involve copying the memory (modulo optimizations).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, probably better to just say that the original owner isn't invalidated.

@alilleybrinker
Copy link
Contributor Author

Alright, I've gone through the latest round of feedback. Let me know if anything else needs fixing!

@brson
Copy link
Contributor

brson commented Jun 7, 2016

Thanks @AndrewBrinker.

@brson brson merged commit 4d9c6b8 into rust-lang:master Jun 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants