-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
A "Design FAQ" document #4047
Comments
The manual has a related (and empty) section: http://dl.rust-lang.org/doc/0.4/rust.html#appendix-rationales-and-design-tradeoffs |
Why are |
Why are early returns disallowed within closures? |
Why are separate |
Why do traits in Rust depart from the design in the original traits paper? |
Why must imports be qualified relative to the crate? |
These are great, please keep them coming |
"What does |
Why feature conditions rather than exceptions? |
Why so many pointer types? Why not rely on escape analysis instead? Answered at: |
Why is the |
Why do borrow checks on |
Why are there no exceptions? |
Why is name resolution such an intractably hard problem?
|
Here's a summary about dynamically sized types https://mail.mozilla.org/pipermail/rust-dev/2013-April/003933.html |
Summary of 'why no exceptions' https://mail.mozilla.org/pipermail/rust-dev/2013-April/003815.html |
Summary of 'why no purity-in-the-type-system, i.e., why no effect system': https://mail.mozilla.org/pipermail/rust-dev/2013-April/003926.html |
document how to make non-utf8 byte vectors with bytes!(…) e.g. |
|
Why have we mostly moved from internal iterators to external iterators? |
Why was the runtime ported from C++ to Rust? |
Why is rustc slow? https://mail.mozilla.org/pipermail/rust-dev/2013-November/006975.html |
Why does one need to explicitly pull a trait into scope in order to access that trait's methods on a (separately imported or locally defined) type? Answer (I think): Because the alternative is name collisions (that could arise much later in the dev cycle). We're just forcing you to resolve those conflicts up front. See also: the wiki |
Why does Rust have two threading implementations? Why does Rust prefer asynchronous channels? Why are struct fields public by default? |
Why are ints pointer sized? |
Why such a verbose syntax for mutable locals? (Why not Some links: https://mail.mozilla.org/pipermail/rust-dev/2014-January/008364.html |
Why no TCO (this comes up all the time): https://mail.mozilla.org/pipermail/rust-dev/2013-April/003557.html |
Why do Rust's submodules map to directories and https://mail.mozilla.org/pipermail/rust-dev/2014-April/009554.html |
Why a dedicated |
See also #14370 |
Why do numeric types wrap on overflow? See also http://blog.regehr.org/archives/1154 (not so relevant anymore. -nmatsakis) |
Why must (not so relevant anymore. -nmatsakis) |
Now that #14370 has been closed, can we close this? |
This thread still has many questions which aren't present in the FAQ, so we may in theory want to add all of them to the FAQ before closing this. |
Agree. We've collected a lot of info here that I don't want to lose. |
"Why does |
"Why is there no |
Why do we need |
Why is moving function arguments the default, not borrowing or copying/cloning? |
"Why is |
I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized. This issue has been moved to the RFCs repo: rust-lang/rfcs#615 |
Oh no! It was really nice that this list was all in one place! |
|
I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized.
Update from pnkfelix: No, that attempted move failed. See rust-lang/rfcs#615 |
I guess closing all your issues is a nice way to pretend they're not issues. Adding an FAQ shouldn't need to go through the RFC process. |
@alexchandel the RFC repo issues are not just for things going through the process. It's also full of suggestions for things like community libraries that could be done. The result of this won't need to go through the RFC process, it's just that I don't plan on writing this any time soon. |
Note also that there are prototype FAQ documents already in
(Nonetheless, these tickets remain worthwhile catch-all lists of questions that may not yet have answers on any of those three documents. I'm still not thrilled with the pseudo-migration to the RFC repo.) |
Yes, I'm not exactly psyched about those ones, either, to be honest.
|
For an example, see this playpen See discussion from 2013-09-10, though it seems like the "decision" there was never implemented (and likely never will at this point?) |
In the vein of the Project FAQ and the Language FAQ.
In addition to being really interesting, this would save a lot of time and divert a lot of potential questions in the long run. Some topics to discuss:
(see e.g. rust-dev post.)
Explanations should be technical and include code examples wherever possible.
Some of the questions of this nature overlap with the latter half of the Language FAQ, but not all, e.g. "Can Rust code call C code?" and "What is the difference between a managed pointer and an owned pointer?" do not belong. The document should focus on large-scale design decisions and tradeoffs; think "Why split stacks?" rather than "How do split stacks work?".
If you think of good questions, add them in the comments here. There are probably a lot of ripe areas for explanation, especially with regard to mutability and regions.
The text was updated successfully, but these errors were encountered: