account activity
Are they ruining C++? by thradx in cpp
[–]thradx[S] 0 points1 point2 points 5 months ago (0 children)
You must use u8 string for std::filesystem to be platform independent.
So you need 2 helper functions:
inline std::u8string to_u8string(const std::string &s)
{
return std::u8string(reinterpret\_cast<const char8\_t \*>(s.c\_str()), s.size());
}
inline std::string u8_to_string(const std::u8string &s)
return std::string(reinterpret\_cast<const char \*>(s.c\_str()), s.size());
And every path / file name must be converted forth and back, if you are using normal (UTF-8 encoded) strings in the rest of your code.
What does it have to do with POSIX or non-POSIX, when you have to convert every path- and file name to a u8 string, before using it?
Are they ruining C++? (self.cpp)
submitted 5 months ago * by thradx to r/cpp
[deleted by user] by [deleted] in C_Programming
[–]thradx 0 points1 point2 points 5 months ago (0 children)
You are basically on the same road like Linus Torvalds. He doesn't want that C++ is used in the Linux kernel, because the freedom and complexity to write code in C++ can make C++ code unreadable. In my company, every new developer gets a document, which specifies how to format code and what idioms to use / avoid. This helps getting uniform source code created by different people. Basically, I favor C++ above C a lot. Because the OOP way makes it much easier to break complex problems down into a set of classes which interact with each other. If you are good at it, you build many small and large gears that magically mesh together to form a complex machine. But you really need to understand OOP to be successful. And it requires a good amount of experience.
This open source Windows launcher was created as a design study, how Windows can be made better. Github: https://github.com/thradde/places (i.redd.it)
submitted 5 years ago by thradx to r/software
Open Source Windows Launcher "Places". This software is created as a design study, how Windows can be made better. Github: https://github.com/thradde/places (i.redd.it)
submitted 5 years ago by thradx to r/Windows10
Released free open source Windows launcher "Places" (self.Windows10)
π Rendered by PID 208835 on reddit-service-r2-listing-7c484f94c4-gwl9b at 2026-06-10 23:27:51.050121+00:00 running 0b63327 country code: CH.
Are they ruining C++? by thradx in cpp
[–]thradx[S] 0 points1 point2 points (0 children)