Earlier quoted context omitted.
> This is the sort of change that adds complexity to the language but reduces complexity in the code written in the language. We take those An admirable statement of policy, but I'm not sure it's possible. Adding complexity to the language means there are more gotchas and edge-cases that a programmer must consider, even if they don't use the feature in question.
> Adding complexity to the language means there are more gotchas and edge-cases that a programmer must consider, even if they don't use the feature in question. Since this is C++, this is not a problem we have to consider
F-strings for C++26 proposal [pdf]
51–60 of 216 posts
Re: F-strings for C++26 proposal [pdf]
#52Earlier quoted context omitted.
17 is worth it for std::filesystem alone. It also has optional and variant.
Filesystem is great. It’s insane it took so long. Optional is nice but slightly awkward in a non-garbage collected language. IMO variant is one of those things that should not exist in standard. It tries to implement discriminated union in C++ but that feature is lame without true pattern matching. And you can’t implement pattern matching without thorough syntax level support. So in my books it’s in this academic “le…
Re: F-strings for C++26 proposal [pdf]
#53Like the compile time isn't long enough. They should just let the compiler do the job like Wformat=2 and skip any preprocess and constexpr function.
It is fast enough when using precompiled headers, binary libraries, and best of all C++20 modules with C++23 modularised standard library. Could it be better? Most likely.
Re: F-strings for C++26 proposal [pdf]
#54Like the compile time isn't long enough. They should just let the compiler do the job like Wformat=2 and skip any preprocess and constexpr function.
It is fast enough when using precompiled headers, binary libraries, and best of all C++20 modules with C++23 modularised standard library. Could it be better? Most likely.
Do any compilers besides VS support this?
Re: F-strings for C++26 proposal [pdf]
#55Earlier quoted context omitted.
constexpr "if" statements (C++20) are also a game-changer.
Those are c++17
Much better than having yet another syntax for macros.
Re: F-strings for C++26 proposal [pdf]
#56Earlier quoted context omitted.
It is fast enough when using precompiled headers, binary libraries, and best of all C++20 modules with C++23 modularised standard library. Could it be better? Most likely.
> best of all C++20 modules Do any compilers besides VS support this?
The only missing piece is that cmake is still in the process to support header units.
GCC is getting there.
Re: F-strings for C++26 proposal [pdf]
#57Earlier quoted context omitted.
It is fast enough when using precompiled headers, binary libraries, and best of all C++20 modules with C++23 modularised standard library. Could it be better? Most likely.
C++ modules do not exist in practice and probably never will.
You could just as well say that anything beyond C89 doesn't exist, given its prevalence in some circles.
Re: F-strings for C++26 proposal [pdf]
#58Earlier quoted context omitted.
It is fast enough when using precompiled headers, binary libraries, and best of all C++20 modules with C++23 modularised standard library. Could it be better? Most likely.
> best of all C++20 modules Do any compilers besides VS support this?
Re: F-strings for C++26 proposal [pdf]
#59Earlier quoted context omitted.
C++ modules do not exist in practice and probably never will.
Office team apparently is of another opinion, as Vulkan folks, and a few other early adopters. You could just as well say that anything beyond C89 doesn't exist, given its prevalence in some circles.
So, like I said, modules don’t exist in practice and I’d be shocked if in 2030 modules were considered normal.
C++11 was pretty game changing. C++14 and C++17 only took a few years to reach widespread adoption.
It’s very safe to require C++17 today. C++20 was a little slower and because of the modules fuckup it’s a bit inconsistent. But it’s largely fine to use.
C++23 probably needs another year or two. But also C++20 and beyond haven’t added much that’s worth upgrading for.
Re: F-strings for C++26 proposal [pdf]
#60Somehow I manage to get by just fine with c++11. I have refactored more than a few codebases that use 17 or greater. Strangely, the codebase became more maintainable afterwards.
C++20's concepts IMHO are a massive update over C++11. You can basically remove almost 90% of inheritance with them without incurring in any issue (you could do that earlier too, but at the expense of incredibly hard to read error messages - now that's basically solved thanks to concepts).