[m-rev.] Bug in API documentation

Julien Fischer jfischer at opturion.com
Fri Nov 14 12:23:11 AEDT 2025


On Fri, 14 Nov 2025 at 06:52, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:
>
> On Wed, 12 Nov 2025 14:24:57 +1100, Peter Wang <novalazy at gmail.com> wrote:
>
> > I'm not convinced. Just write the if-then-else at the call site(s),
> > or add a utility predicate to your application.
>
> I am convinced. The reason is my experience with shell programming,
> where I have always hated the absence of any mechanism for getting a list
> of all files that match a given pattern that works even when the list of
> matching files is empty. Meaning that e.g. if your current directory contains
> no files with the extension .xyz, then in sh and bash, the glob pattern "*.xyz"
> expands to "*.xyz" instead of the empty string.
>
> Yes, you can work around this by adding an if-then-else that checks for that
> and sets the list to empty, but there is no point in requiring this to be done
> separately by every single program that needs this functionality, when it
> could be done just once.
>
> This is why I want to commit the attached diff. The code is trivial, so the
> only question for reviewers is: do we want a predicate version as well as
> a predicate version? (In situations analogous to *.xyz, we definitely want
> a function version.)

I don't think we need a predicate version.

Julien.


More information about the reviews mailing list