Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Most of the language additions are aimed at library designers and writers, where they can give significant performance and ease-of-use improvements, rather than at C++ application developers.


I don't see any mention of std::format, it's great for app developers, I don't think any compilers support it yet though. It's pretty much just the fmt package that you can use now.


It's a library addition, not a language addition.


Well, yes, but it was added in the C++ standard. I guess the standard covers the language and the library, but to me, the standard library is part of the language.


it's part of the language, but not of the core language


This is really a false/meaningless distinction though. The C++ spec covers the “language” (it’s one of the first sentences), and that includes the standard library. The spec uses the terminology language and library but there is no formal distinction between them other than how they’re organized in the spec. A conformant compiler could implement the entire STL as a built in if it wanted to.

There is a formal distinction between hosted and freestanding, but that’s not the same as library/language. Cf https://en.cppreference.com/w/cpp/freestanding

I really don’t care for pedantry, but when people start correcting others then had better be right.


Let me quote the standard then:

    [intro.structure]
    Clause 5 through Clause 15 describe the C++ programming language. 
    That description includes detailed syntactic specifications in a form described in 4.3. 
    For convenience, Annex A repeats all such syntactic specifications.

    Clause 17 through Clause 32 and Annex D (the library clauses) describe the C++ standard library. 
    That description includes detailed descriptions of the entities and macros that constitute the library, in a form described in Clause 16.
it's pretty obvious from that than the library is seen as separate from the language - and yes, std:: could be entirely built-ins but as always that'd be under the as-if rule of optimization.

Else what would be the meaning of core language defects ? http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html


I think I addressed that: “how they’re organized in the spec”. They’re distinct, but outside of internal references in the spec the distinction between language and library doesn’t really matter. To a user of C++ it’s all one spec with distinctions for freestanding and hosted implementations, etc. You can’t have a conformant C++ implementation without elements from both.

The original point of this thread was about where std::format exists and from a implementation point of view it doesn’t really matter.


Not really, it is a subset of fmt.


very informative, for application developers probably the basic syntax, plus STL are enough to start, instead of chasing modules/concepts which are great to have, but adds complexity for certain c++ users(e.g. application developers).

STL containers and algorithms are the true gems from c++, paired with the speed and memory efficiency and smart-pointers, c++ is just getting stronger these days.


This makes sense! Thank you




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: