Subject: Re: [RFC][PATCH] t-prio-queue: simplify using compound literals

From: Junio C Hamano <[email-masked]>
Date: Mon, 08 Apr 2024 09:57:41 -0700

Jeff King <[email-masked]> writes:

>> We should still be hesitant against the practice to the same degree
>> that we are hesitant against struct assignment, especially when the
>> struct is of nontrivial size, or the struct has a pointer member
>> whose memory ownership semantics goes against shallow copying of the
>> struct.
>
> Good point. There are really two thresholds: is this something that
> should be totally forbidden, and is this something that is generally a
> good idea. I think the answers here are "no" and "yes" respectively.

I agree with your conclusion but I found the above a bit confusing.

Between "totally horrible, do not even think about it" (0%) and
"that is of course an excellent idea" (100%), you want to have two
points "might have some merit but not acceptable" (33%) and
something else that is less than "of course an excellent idea" but
still acceptable (66%)?  I would not phrase the last threshold "is
generally a good idea", though.  "It is not generally a good idea,
but in this case, it is an adequate solution", maybe.