Comments (7)
The only thing I don't like about bool is that:
int isTrue() { return 1 }
is not the same as
bool isTrue() { return true}
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.
from valkey.
What's a c++ comment?
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
from valkey.
What's a c++ comment?
from valkey.
What's a c++ comment?
// "C++ style" line comments are valid in C99
from valkey.
Let's keep these conventions then. Are they actually written down anywhere?
from valkey.
They're coming from c++ originally i believe.
https://en.cppreference.com/w/c/comment
from valkey.
I remember in very old C, there is no bool type, it is not like C++, which has built-in data type boolean.
After C99, C import bool type, but in low level, i think it need to be converted into integer zero or non-zero value.
Thus, i think in valkey, we do not need to import #include <stdbool.h>.
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.
from valkey.
Related Issues (20)
- [NEW] benchmark over test framework
- Updated CI testing to improve catching tests early.
- Investigate using path filters to reduce the number of tests we are running
- Investigate performance improvements related to slot ownership in getNodeByQuery HOT 8
- Request for Valkey to support element level TTL for hash, set and sorted set HOT 4
- [BUG] Stream lag value could be incorrect HOT 1
- [NEW] Add "Total" message and used_memory_human log information in serverCron() function
- Changing Valkey RDB magic for Valkey 8 HOT 14
- [DOC] Document the clang-format flow HOT 2
- Test failure unit/cluster/slot-migration
- Revise config defaults for Valkey 8 HOT 6
- [NEW] Improve cluster logs HOT 1
- GEOSEARCHSTORE - ASC | DESC options are meaningless HOT 2
- Extended Valkey client introspection functionality HOT 3
- Valkey support for memory locking (?) HOT 3
- Memory protected (debug) mode
- Introduce new rax function `raxAllocSize` to return rax tree allocation size in constant time HOT 3
- Parallel execution of read operations HOT 1
- [NEW] Please publish Debian artifacts HOT 3
- [NEW] Add the test scenario of `io-uring-enabled yes` to daily test.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from valkey.