Hi Bruno,

On 2026-03-11T18:28:04+0100, Bruno Haible wrote:
> Alejandro Colomar wrote:
> > We voted yesterday the proposal n3750 with the name aprintf(), and the
> > votes were 10-8-0 (yes-no-abstention).  Most of those 'no' votes (if not
> > all) said it was just about the name.  And the only strong reason they
> > brought was that they don't believe this is something that
> > implementations would find acceptable, not because of the name itself.
> > 
> > So, if large implementations do add it, that would invalidate those
> > arguments.
> 
> It feels safe to add it to Gnulib, because — as shown — several other
> packages define aprintf() in the same way. In the worst case, WG14 will
> pick a different name, and Gnulib will then follow suit.

Thanks!  I'll try to use this to push for the name.  Just in case they
insist against it, I'd like to ask for your preference:

-  If they reject aprintf(), I could drop the proposal from WG14
   entirely, and leave this as an extension that will hopefully be
   implemented elsewhere (glibc, BSDs, ...) with time, and possibly
   standardized in some decades as aprintf(), once it's wide spread.

-  Or we could try a second name, to try to have it in the standard
   already, which would help adoption, but might be worse for the name
   in the long term.  WG14 is a bad place to discuss names.  (I learnt
   that with _Countof(), which almost stayed as _Lengthof(), which would
   have been terrible.)

Do you have any preference on those two alternatives, and if the latter,
do you have any preference for the second name?

> 2026-03-11  Bruno Haible  <[email protected]>
> 
>       vaprintf: Add tests.
>       * tests/test-vaprintf.c: New file, based on tests/test-xvasprintf.c.
>       * modules/vaprintf-tests: New file.
> 
>       vaprintf: New module.
>       * lib/stdio.in.h (_GL_ATTRIBUTE_DEALLOC_FREE): New macro, copied from
>       lib/string.in.h.
>       (free, rpl_free): Define as in lib/string.in.h.
>       (aprintf, vaprintf): New declarations.
>       * lib/vaprintf.c: New file, based on lib/xvasprintf.c.
>       * lib/aprintf.c: New file, based on lib/xasprintf.c.
>       * m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize
>       GNULIB_VAPRINTF. Require gl_STDLIB_H_REQUIRE_DEFAULTS.
>       * modules/stdio-h (Depends-on): Add stdlib-h.
>       (Makefile.am): Substitute GNULIB_VAPRINTF, GNULIB_FREE_POSIX,
>       REPLACE_FREE.
>       * modules/vaprintf: New file.

Nice!!


Cheers,
Alex

-- 
<https://www.alejandro-colomar.es>

Attachment: signature.asc
Description: PGP signature

Reply via email to