C++ Logo

sg16

Advanced search

Re: [SG16] P2093 Formatted output

From: Victor Zverovich <victor.zverovich_at_[hidden]>
Date: Sat, 12 Dec 2020 08:35:19 -0800
Hi Peter,

Thanks for the feedback.

> when I std::print() something, and it is going to be displayed to the
user, then I want it to be displayed in a semantic-preserving manner.

That's pretty much the intent of the paper.

> I think this is a really important aim and I wouldn't like it to be
dropped from the proposal.

I'm glad we are on the same page =).

> Could appealing to "semantic preservation" allow the question of text
encodings to be left out of the wording?

Possibly but wouldn't we have to define what "semantic preservation" means
or do you think it is self descriptive enough?

> Did you consider only having the semantic-preserving display behaviour
associated with the "no output stream" form of std::print() invocation?

Yes and I think having a different behavior for print(...) and
printf(stdout, ...) would be very confusing.

- Victor


On Thu, Dec 10, 2020 at 8:32 AM Peter Brett <pbrett_at_[hidden]> wrote:

> Hi Victor,
>
> Thank you very much for presenting yesterday! Your experiments were very
> interesting. Thank you also for your patience. I'm sorry we haven't been
> able to come to a conclusion on your proposal yet.
>
> I feel like Rust and Java have an unfair advantage over C++ because they
> has exactly one, completely specified, internal string representation to
> worry about. In my limited experience of Rust it makes handling strings so
> much easier.
>
> I had some further thoughts overnight.
>
> - I can rephrase the controversial feature thus: when I std::print()
> something, and it is going to be displayed to the user, then I want it to
> be displayed in a semantic-preserving manner. I think this is a really
> important aim and I wouldn't like it to be dropped from the proposal.
>
> - Could appealing to "semantic preservation" allow the question of text
> encodings to be left out of the wording? We put text into std::print(),
> some implementation-defined magic happens, and then the user gets to read
> the text.
>
> - Did you consider only having the semantic-preserving display behaviour
> associated with the "no output stream" form of std::print() invocation?
>
> I'm really keen to get std::print into C++23. I really want to make sure
> that we specify it in a way that doesn't contain surprises.
>
> Best regards,
>
> Peter
>

Received on 2020-12-12 10:35:33