Stream: project-ffi-unwind

Topic: posting the RFc


nikomatsakis (May 12 2020 at 21:34, on Zulip):

So, @BatmanAoD (Kyle Strand) -- is anything hold us back from posting this rfc?

BatmanAoD (Kyle Strand) (May 13 2020 at 17:39, on Zulip):

Sorry, I didn't realize I had Zulip closed yesterday! There are still two TODO items in the doc, and I did also want to add some kind of new user-friendly term for "drop glue".

BatmanAoD (Kyle Strand) (May 13 2020 at 17:39, on Zulip):

Or rather, for the property of a frame having drop glue that will execute if an unwind happens

BatmanAoD (Kyle Strand) (May 13 2020 at 18:41, on Zulip):

The two TODOs are for adding more background info on discussions prior to the formation of the project group, and explaining why we're not just stabilizing #[unwind(allowed)].

nikomatsakis (May 13 2020 at 19:06, on Zulip):

BatmanAoD (Kyle Strand) said:

Or rather, for the property of a frame having drop glue that will execute if an unwind happens

maybe we should call it a "pending" frame or something?

nikomatsakis (May 13 2020 at 19:06, on Zulip):

I guess though we want in particular a name for frames that have no work to do

nikomatsakis (May 13 2020 at 19:06, on Zulip):

"passive"?

nikomatsakis (May 13 2020 at 19:06, on Zulip):

I still don't hate inert, I have to admit

nikomatsakis (May 13 2020 at 19:07, on Zulip):

I don't know of any existing terminology for this, so it seems like we have to create some

BatmanAoD (Kyle Strand) (May 13 2020 at 19:15, on Zulip):

I don't "hate" inert either, but I think it's.... a good analogy that could probably fit a different concept better in the future. When I hear "inert" I think of chemicals that don't react with other chemicals. In our context, these frames don't "react with" an unwinding operation, so it's not a terrible analogy. But somehow it doesn't strike me as immediately self-explanatory.

BatmanAoD (Kyle Strand) (May 13 2020 at 19:15, on Zulip):

Maybe if it's qualified: "unwind-inert."

BatmanAoD (Kyle Strand) (May 13 2020 at 19:16, on Zulip):

Yeah, I guess that would resolve my main concern, which is that "inert" doesn't sound specifically related to unwinding, cleanup, stack frames, etc.

BatmanAoD (Kyle Strand) (May 13 2020 at 19:17, on Zulip):

(As a totally hand-wavy hypothetical example, "inert" could be used some day to refer to some property of threads that prevents them from interacting with other threads in an observable way.)

BatmanAoD (Kyle Strand) (May 13 2020 at 19:17, on Zulip):

(Here, "threads" are analogous to "chemicals", and some are "inert" while others are not)

BatmanAoD (Kyle Strand) (May 13 2020 at 19:18, on Zulip):

What do you think of my suggestion of "disposable"? Or some other word for ready-to-be-disposed-of?

BatmanAoD (Kyle Strand) (May 13 2020 at 19:24, on Zulip):

"trivial-drop"

nikomatsakis (May 13 2020 at 21:40, on Zulip):

"unwind-oblivious"?

nikomatsakis (May 13 2020 at 21:40, on Zulip):

"disposable" doesn't feel very clear to me, I can't tell whether it means that there is or is not drop code to run

nikomatsakis (May 13 2020 at 21:41, on Zulip):

"trivial" is not a bad word for this

nikomatsakis (May 13 2020 at 21:41, on Zulip):

certainly saying that a POD struct has trivial drop is pretty reasonable

BatmanAoD (Kyle Strand) (May 14 2020 at 15:39, on Zulip):

"drop-pure", because obviously introducing the concept of function purity will clear everything up :laughing:

BatmanAoD (Kyle Strand) (May 14 2020 at 15:39, on Zulip):

I kind of like "unwind-oblivious."

nikomatsakis (May 14 2020 at 16:37, on Zulip):

"POSF" -- plain old stack frame :)

BatmanAoD (Kyle Strand) (May 14 2020 at 16:38, on Zulip):

I kind of love that, actually

BatmanAoD (Kyle Strand) (May 14 2020 at 16:38, on Zulip):

Though "POS" always makes me think "piece of --"

BatmanAoD (Kyle Strand) (May 14 2020 at 16:38, on Zulip):

and then "point-of-sale"

nikomatsakis (May 14 2020 at 16:38, on Zulip):

BatmanAoD (Kyle Strand) said:

Though "POS" always makes me think "piece of --"

I was aware of this connotation :P

BatmanAoD (Kyle Strand) (May 14 2020 at 16:38, on Zulip):

Maybe just make the connection to PODs explicit? PODF

nikomatsakis (May 14 2020 at 16:39, on Zulip):

"Data frame"?

nikomatsakis (May 14 2020 at 16:39, on Zulip):

I do have to say that "plain old" is one of my favorite C++ "technical terms"

nikomatsakis (May 14 2020 at 16:39, on Zulip):

at least to me it was immediately clear what it meant when I first heard it :)

nikomatsakis (May 14 2020 at 16:40, on Zulip):

I suppose the acronym goes a long way to making it obscure again though

BatmanAoD (Kyle Strand) (May 14 2020 at 16:42, on Zulip):

It's the only good one!

BatmanAoD (Kyle Strand) (May 14 2020 at 16:42, on Zulip):

Arguably

Josh Triplett (May 14 2020 at 17:49, on Zulip):

I'd be in favor of either "POD Frame" or "POF (plain old frame)".

BatmanAoD (Kyle Strand) (May 14 2020 at 17:51, on Zulip):

I think let's go with POF. It's a distinct enough concept that using the word "POD" might lead to a false sense of confidence that the term can be understood without an explanation. But "POF" looks similar enough to "POD" that it'll probably work as a mnemonic.

Amanieu (May 14 2020 at 17:52, on Zulip):

.. I kinda liked inert.. (but don't mind me, this is devolving into a bikeshed)

Amanieu (May 14 2020 at 17:53, on Zulip):

I don't think "plain old" is very descriptive at all. It works in C++ because "old" clearly refers to C, but we don't have that in Rust.

BatmanAoD (Kyle Strand) (May 14 2020 at 18:01, on Zulip):

Hmmmmmm

BatmanAoD (Kyle Strand) (May 14 2020 at 18:02, on Zulip):

"plain old" is really more of an idiom, I'd say, just meaning "basic" or "well-understood". The point is that there's a difference in C++ between objects that are "just" data and objects that are... not. Sure, POD structs are just C structs, but I don't think the "old" in POD actually refers to C.

BatmanAoD (Kyle Strand) (May 14 2020 at 18:03, on Zulip):

I think bikeshedding is useful in this case, because C++ has _so many_ bad names/acronyms, and we risk introducing yet another bad name/acronym to the systems programming domain if this terminology catches on more broadly.

BatmanAoD (Kyle Strand) (May 14 2020 at 18:04, on Zulip):

(I.e. I want to avoid another RAII/PIMPL/"zero-cost")

nikomatsakis (May 14 2020 at 18:43, on Zulip):

I think POF is good

nikomatsakis (May 14 2020 at 18:43, on Zulip):

I agree that I never thought of "old" as referring to C

nikomatsakis (May 14 2020 at 18:43, on Zulip):

but more the "it's just a plain old something" idiom, but I guess that is .. well .. idiomatic :)

BatmanAoD (Kyle Strand) (May 15 2020 at 02:43, on Zulip):

https://rust-lang.zulipchat.com/#narrow/stream/210922-project-ffi-unwind/topic/posting.20the.20RFc/near/197461120

BatmanAoD (Kyle Strand) (May 27 2020 at 19:28, on Zulip):

@nikomatsakis @Amanieu @acfoltzer

Even though I don't think the RFC is ready yet for a PR on the RFC repo (sorry, I haven't worked on it since our last discussion), would any of you object to merging it in its current state into the master branch of the project repo?

acfoltzer (May 27 2020 at 19:28, on Zulip):

no objections here

BatmanAoD (Kyle Strand) (May 27 2020 at 19:29, on Zulip):

Also, Amanieu, did the discussion on "plain old" resolve your concern? At this point I am leaning toward POF

nikomatsakis (May 27 2020 at 19:55, on Zulip):

no objections @BatmanAoD (Kyle Strand)

Amanieu (May 27 2020 at 21:22, on Zulip):

shrug I still don't like it... but meh, I don't care enough to argue.

BatmanAoD (Kyle Strand) (May 30 2020 at 20:23, on Zulip):

Wrapping up the RFC draft: here's my attempt to summarize a few years of argument into a couple of paragraphs, with links should people want to read more. Do we believe this is sufficient? https://github.com/BatmanAoD/project-ffi-unwind/blob/Rfc-POF-terminology/rfcs/0000-c-unwind-abi.md#older-discussions-about-unwinding-through-extern-c-boundaries

BatmanAoD (Kyle Strand) (May 30 2020 at 20:25, on Zulip):

https://github.com/rust-lang/project-ffi-unwind/pull/29

BatmanAoD (Kyle Strand) (Jun 03 2020 at 22:54, on Zulip):

@WG-ffi-unwind Not sure who saw my message above, but I think the RFC is about ready to go.

nikomatsakis (Jun 04 2020 at 14:03, on Zulip):

@BatmanAoD (Kyle Strand) nice! I missed that, will take a look at the PR

Last update: Jun 05 2020 at 23:10UTC