git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
	phillip.wood@dunelm.org.uk,  git@vger.kernel.org,
	 Emily Shaffer <nasamuffin@google.com>,
	 Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Subject: Re: [RFC PATCH 1/1] Add a type for errors
Date: Thu, 03 Oct 2024 09:05:17 -0700	[thread overview]
Message-ID: <xmqqwmipi342.fsf@gitster.g> (raw)
In-Reply-To: <CAPig+cQjk5_VJ-LNc9Hx3Q4n6H5bgg5cAztWhFpuweG8wFTjMw@mail.gmail.com> (Eric Sunshine's message of "Thu, 3 Oct 2024 01:14:11 -0400")

Eric Sunshine <sunshine@sunshineco.com> writes:

> Your proposal uses Rust as a model to justify the API choice in this
> RFC, but Phillip's point was that -- despite being perfectly suitable
> in Rust -- it is _not_ ergonomic in C.
> ...
> That's why I said in my original response that I didn't understand
> your response to Phillip. You seem to be using a non-justification
> ("other programmers suffer, so Git programmers can suffer too") as a
> justification for a non-ergonomic design.

The statement may be a bit too harsh, as some may not even realize
that they are suffering anymore, after prolonged exposure to these
idioms, just like C folks consider it is a fact of life that they
have to carefully manage their pointers and the memory they point
at.

I do agree that "return value with more details in the out parameter
whose address is supplied by the caller" is a convention that is
easier to grok when written in C.

Thanks.

  reply	other threads:[~2024-10-03 16:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30 22:03 [RFC PATCH 0/1] Typed errors brian m. carlson
2024-09-30 22:03 ` [RFC PATCH 1/1] Add a type for errors brian m. carlson
2024-09-30 22:44   ` Junio C Hamano
2024-09-30 23:35     ` brian m. carlson
2024-10-21 12:46       ` Patrick Steinhardt
2024-10-01 15:29   ` Oswald Buddenhagen
2024-10-02 14:01     ` Phillip Wood
2024-10-01 20:31   ` Emily Shaffer
2024-10-02 21:51     ` brian m. carlson
2024-10-02  9:54   ` Phillip Wood
2024-10-02 22:04     ` brian m. carlson
2024-10-02 22:16       ` Eric Sunshine
2024-10-02 22:24         ` brian m. carlson
2024-10-03  5:14           ` Eric Sunshine
2024-10-03 16:05             ` Junio C Hamano [this message]
2024-10-03 22:27               ` Eric Sunshine
2024-10-04  0:15                 ` brian m. carlson
2024-10-04  9:00       ` phillip.wood123
2024-10-04 12:13         ` Richard Kerry
2024-10-03 16:17     ` Emily Shaffer
2024-10-04  9:00       ` phillip.wood123

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=xmqqwmipi342.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=nasamuffin@google.com \
    --cc=oswald.buddenhagen@gmx.de \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=sandals@crustytoothpaste.net \
    --cc=sunshine@sunshineco.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).