8000 MaybeDangling by RalfJung · Pull Request #3336 · rust-lang/rfcs · GitHub
[go: up one dir, main page]

Skip to content

MaybeDangling #3336

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 20 commits into from
May 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
mention the maybe-dangling crate
  • Loading branch information
RalfJung committed Dec 7, 2023
commit 64bf786d281bdbab3e27ec91c1058ea3d0fa3c24
3 changes: 3 additions & 0 deletions text/0000-maybe-dangling.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ The author cannot think of prior art in other languages; the issue arises becaus
Inside Rust, we do have precedent for wrapper types altering language semantics; most prominently, there are `UnsafeCell` and `MaybeUninit`.
Notice that `UnsafeCell` acts "behind references" while `MaybeDangling`, like `MaybeUninit`, acts "around references": `MaybeDangling<&T>` vs `&UnsafeCell<T>`.

There is a [crate](https://docs.rs/maybe-dangling) offering these semantics on stable Rust via `MaybeUninit`.
(This is not "prior" art, it was published after this RFC came out. "Related work" would be more apt. Alas, the RFC template forces this structure on us.)
Copy link
Contributor

Choose a reason for hiding this comment

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

Extreme pedantry: arguably, "prior" in "prior art" as used by the RFC template means "prior to when this RFC is accepted." The history of past revisions of the RFC document is not part of the final product that gets FCPed and published in the RFC Book. So "prior art" is an accurate description of https://docs.rs/maybe-dangling, and the RFC template is perfectly innocent here.

Copy link
Member Author
@RalfJung RalfJung Dec 8, 2023

Choose a reason for hiding this comment

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

That's not how the term "prior art" is usually used in scientific context. When there is a causal dependency where A caused B, then B cannot be prior art of A, even if the publication of paper A happens after B becomes public. (There is often a significant delay between writing and submitting a paper, and having it published.) Here, as far as I can see, the RFC inspired that crate, so if anything the RFC is prior art for the crate, not vice versa.

Alas, I have several gripes with the strict form of the template, but not the patience to try and fix it.^^

Copy link
Contributor
@Jules-Bertholet Jules-Bertholet Dec 8, 2023

Choose a reason for hiding this comment

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

The way I see it, the initial draft of the RFC inspired the crate, which in turn inspired a subsequent draft. But that subsequent draft should be considered a distinct document from the initial draft. Published RFCs, unlike scientific papers, are considered as emanating from the team that approved them, and represent the perspective of that team at the time of FCP approval (the original author is not even listed in the RFC Book).

Copy link
Member Author

Choose a reason for hiding this comment

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

I disagree, but it doesn't seem useful to discuss this here.


# Unresolved questions
[unresolved-questions]: #unresolved-questions

Expand Down
0