News for hackers. Stuff that matters.
Re:F-strings for C++26 proposal [pdf] by edflsafoiewq on Sunday February 02, 2025 @10:18PM (#42914537)
17 is worth it for std::filesystem alone. It also has optional and variant.
Re:F-strings for C++26 proposal [pdf] by fsloth on Monday February 03, 2025 @12:49AM (#42915362)
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 “let’s pretend a while we are using some other language…” category.

It’s _occassionally_ convenient for sure.

Re:F-strings for C++26 proposal [pdf] by OskarS on Monday February 03, 2025 @03:47AM (#42916228)
> 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 “let’s pretend a while we are using some other language…” category.

I agree, they should have made it a language/syntax feature. However: if you wanna do a sum type, it does do that. I'd rather have that than nothing.

Re:F-strings for C++26 proposal [pdf] by pjmlp on Monday February 03, 2025 @01:40AM (#42915600)
Might still land on C++26, but most likely C++29, then you'll have pattern matching.
Re:F-strings for C++26 proposal [pdf] by cemdervis on Thursday February 06, 2025 @11:42AM (#42964103)
Fingers crossed
Re:F-strings for C++26 proposal [pdf] by account42 on Tuesday February 04, 2025 @05:00AM (#42930432)
std::filesystem is useless because like so many platform abstractions it doesn't handle the last 1% correctly.

IMO the C++ standard should focus platform-agnostic functionality and leave the nitty gritty platform interaction to standalone libraries that can be patched and/or replaced as needed.

Re:F-strings for C++26 proposal [pdf] by edflsafoiewq on Tuesday February 04, 2025 @12:39PM (#42935816)
Why does that make it useless? paths can be converted to basic_strings for passing to platform-specific functions to handle that 1%.