3 ms·
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 thing
by fsloth 2y ago
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.
- pjmlp 2y agoMight still land on C++26, but most likely C++29, then you'll have pattern matching.
- cemdervis 2y agoFingers crossed
- OskarS 2y ago> 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.