Re: [PATCH] describe: fix --no-exact-match
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 10, 2023, 01:00 UTC
- Message-ID
- <xmqqo7jfk8xq.fsf@gitster.g>
- In-Reply-To
- <20230810002638.GC795985@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> int my_foo;
> ...
> OPT_CALLBACK('f', "foo", int, &my_foo, ...etc);
>
> Not great, but it might not be _too_ bad given that most helpers like
> OPT_BOOL() can just say "int" behind the scenes.
>
> That said, I don't recall these void pointers being a large source of
> errors in the past. So while it's a fun type-system puzzle, the
> effort/reward ratio might not be favorable.I tend to agree on both counts, it is a fun puzzle, and it probably is not going to give us sufficient reward. The fact that "int" and typeof(my_foo) need to be manually kept straight defeats the "type safety" justification for this mental exercise.
Thanks.