All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "René Scharfe" <l.s.r@web.de>, "Git List" <git@vger.kernel.org>,
	"Chandra Pratap" <chandrapratap3519@gmail.com>
Subject: Re: [RFC][PATCH] t-prio-queue: simplify using compound literals
Date: Mon, 08 Apr 2024 09:57:41 -0700	[thread overview]
Message-ID: <xmqqo7ajdc6y.fsf@gitster.g> (raw)
In-Reply-To: <20240407012844.GC1085004@coredump.intra.peff.net> (Jeff King's message of "Sat, 6 Apr 2024 21:28:44 -0400")

Jeff King <peff@peff.net> 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.


  reply	other threads:[~2024-04-08 16:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02 18:30 [RFC][PATCH] t-prio-queue: simplify using compound literals René Scharfe
2024-04-02 20:31 ` Junio C Hamano
2024-04-02 20:41 ` Jeff King
2024-04-05 17:44   ` René Scharfe
2024-04-05 19:17     ` Jeff King
2024-04-05 22:01       ` Junio C Hamano
2024-04-06  7:06         ` René Scharfe
2024-04-07  1:28         ` Jeff King
2024-04-08 16:57           ` Junio C Hamano [this message]
2024-04-08 17:09             ` Jeff King
2024-04-11 21:23 ` Josh Steadmon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqo7ajdc6y.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=chandrapratap3519@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=l.s.r@web.de \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.