New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NEW] use native bool
type in Valkey
#413
Comments
What's a c++ comment? |
The only thing I don't like about bool is that:
is not the same as
Since a bool is only 1 byte. We have actually had production outages because of that mistake at AWS, because we internally use bool in various places, and people didn't understand the difference. More generally, I prefer the code to more or less all use the same conventions. It's much more important to me to be consistent, since the more we diverge the more folks will poke in and say they want to do something else because that is the way that they like it. |
// "C++ style" line comments are valid in C99 |
Let's keep these conventions then. Are they actually written down anywhere? |
I've never heard these be called C++ comments, always single line comments. That just might be because I never write C++ code though :D |
They're coming from c++ originally i believe. |
I remember in very old C, there is no bool type, it is not like C++, which has built-in data type boolean. Personally, I have C++ experience. I still remember when I read redis code initially, because Redis is written by pure C language, I am confused by some C syntax. |
This feels almost like a separate major decision since it's so deeply rooted in this code base. We have atomics and other C99 and later features, but not bool and C++ comments. 馃槃
I'd like to hear arguments against adding it though. It's part of C nowdays and it's odd to have a rule that forbids it.
Originally posted by @zuiderkwast in #245 (comment)
The text was updated successfully, but these errors were encountered: