- 1 Post
- 11 Comments
You beat me to it!
I have a solution with a bit fields. Now your bool is 1 byte :
struct Flags { bool flag0 : 1; bool flag1 : 1; bool flag2 : 1; bool flag3 : 1; bool flag4 : 1; bool flag5 : 1; bool flag6 : 1; bool flag7 : 1; };
Or for example:
struct Flags { bool flag0 : 1; bool flag1 : 1: int x_cord : 3; int y_cord : 3; };
kiri@ani.socialto linuxmemes@lemmy.world•made a Linux community all about customizing your distro (link in the body)15·1 month agoFediverse-friendly link (for non-lemmy.world instances): [email protected].
Literally me right now. (Seems I am going to be a senior dev.)
It’s pleasure for me to write in rust, I really like how fast I can deploy a working solution (including debug time). As I mentioned, there are situations when, for some reason, you cannot do without C++. But you are right cpp-analyzers do not solve all possible problems.
Yeah, I know, that all just a humour. I almost always use C++, inspite of knowing rust (cz no jun vacncies for rust, but still). There is no modern language which is absolutely better than other one — compromises are everywhere, that’s why it’s a silly topic to argue about.
There are C++ analyzers like this which are also designed to prevent it (if you have no choice between languages).
Thanks to modern linux environment I didn’t even need to reboot, after 3 minutes it just stopped. It’s strange that I could use all my programs except
htop
andps
…