C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Fw: Supporting f-strings in C++: draft-R1

From: Chris Gary <cgary512_at_[hidden]>
Date: Sun, 15 Oct 2023 15:40:17 -0600
>
> RTTI and iostream which MOST C++ projects ban them


Everywhere I go, the standard library has been a chronic case of
Procustes meets Godzilla.

Sadly, the same is true for most of boost as well. When it was new, I
encountered an ABA problem with boost mutex on Windows - (lazy event handle
init). I ended up writing one anyway.

It isn't a case of reinventing the wheel, so much as it is making one that
is at first round.

Interpolated literals can be made simple, but honestly the complexity
introduced in the compiler may well exceed what it removes from the average
codebase.
I see it being beneficial where an application has a lot of text baked into
it, but that isn't what I usually encounter (localized strings are
generally mapped to IDs, which can't be formatted strings). I'm a sucker
for syntactical sugar where it can be afforded, though.

On Sun, Oct 15, 2023 at 10:56 AM ejuwte nelvlsk via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> People like me still do not get the zealotry in WG21 to advocate format
> string instead of adding interpolated string literal. Yeah
>
> I have said for many years std::format and format string in general are
> historical mistakes. Thread like this proves my point.
>
> Why would you need std::format in C++? A lot of people including me still
> do not get it. The std::format or its original prototype fmt are extremely
> slow. And even people need to use that, they can just go to fmt's github to
> build it within 1 minute. std::format is even much slower than its
> prototype, fmt::format. Just like std::regex is extremely slow compared to
> its prototype boost::regex.
>
> fmt_slow_for_u32.md (github.com)
> <https://gist.github.com/Au-lit/447f376101674503aac2d721fcee0cd1>
> <https://gist.github.com/Au-lit/447f376101674503aac2d721fcee0cd1>
> fmt_slow_for_u32.md
> <https://gist.github.com/Au-lit/447f376101674503aac2d721fcee0cd1>
> GitHub Gist: instantly share code, notes, and snippets.
> gist.github.com
> **
> **
> **
>
>
> Not mentioning fundamentally flawed idea which is format string that has
> been historically security flaws.
> std::format should just be removed. It is regex 2.0.
>
> Why would C++, a so-called zero-overhead principal language would add
> something that completely violates zero-overhead principle instead of
> adding something to completely replace iostream? It is ridiculous.
>
> Do not tell me "Hey other languages have it so we need to have it." C++
> has paid the price for doing so in the past. Remember Garbage Collection
> Interface? Remember Regex? Why do you want another mistake by adding
> something that C++ simply does not need instead of using that resources to
> fix the fundamental issues with C++ which are exceptions, RTTI and iostream
> which MOST C++ projects ban them
>
> Interpolated string literal is a good idea and i think it should be in
> C++, but you need to fix iostream first. It just shows the incompetent of
> WG21 and modern C++ losers in general.
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2023-10-15 21:40:29