Date: Thu, 11 May 2023 06:54:49 -0700
I think overloading print to either take or not take a format string is not
a good idea because it subtly changes code semantics depending on whether
the first argument is a string or not. If you pick a different name for the
functionality you are proposing then I won't be opposed but not
particularly interested in this either because the usability benefits are
minimal.
Cheers,
Victor
On Wed, May 10, 2023 at 10:23 PM Andrew Tomazos via Std-Proposals <
std-proposals_at_[hidden]> wrote:
> Please find below a LIVE LINK to a short 2-page proposal:
>
> D2879R0 Proposal of Pythonesque std::print extensions
>
> https://docs.google.com/document/d/1E5y_osldYmdBYxUQh8sBlGIEOxJ0FoRiXAJaJD4XATQ
>
> > We propose extensions to std::print/ln such that the format string is
> automatically deduced and/or extended from the arguments to std::print/ln -
> in a similar fashion to the existing practice of the Python `print`
> function, and like other similar functions from other languages.
>
> Feedback appreciated,
>
> Enjoy,
> Andrew.
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
a good idea because it subtly changes code semantics depending on whether
the first argument is a string or not. If you pick a different name for the
functionality you are proposing then I won't be opposed but not
particularly interested in this either because the usability benefits are
minimal.
Cheers,
Victor
On Wed, May 10, 2023 at 10:23 PM Andrew Tomazos via Std-Proposals <
std-proposals_at_[hidden]> wrote:
> Please find below a LIVE LINK to a short 2-page proposal:
>
> D2879R0 Proposal of Pythonesque std::print extensions
>
> https://docs.google.com/document/d/1E5y_osldYmdBYxUQh8sBlGIEOxJ0FoRiXAJaJD4XATQ
>
> > We propose extensions to std::print/ln such that the format string is
> automatically deduced and/or extended from the arguments to std::print/ln -
> in a similar fashion to the existing practice of the Python `print`
> function, and like other similar functions from other languages.
>
> Feedback appreciated,
>
> Enjoy,
> Andrew.
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
Received on 2023-05-11 13:55:02