C++ Logo


Advanced search

[SG16] P2093 Formatted output

From: Peter Brett <pbrett_at_[hidden]>
Date: Thu, 10 Dec 2020 16:32:43 +0000
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,


Received on 2020-12-10 10:32:49