What does "k" mean in http? #4934
-
I was reading http, and I found there is k words like below... What does "k" mean? const kHeaders = Symbol('kHeaders');
const kHeadersCount = Symbol('kHeadersCount');
const kTrailers = Symbol('kTrailers');
const kTrailersCount = Symbol('kTrailersCount'); |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 4 replies
-
it is probably inherited from the variable naming convention from pls refer to hungarian notation for additional context. /cc @addaleax to see if there is a better explanation. |
Beta Was this translation helpful? Give feedback.
-
To add more niche knowledge onto the answer: |
Beta Was this translation helpful? Give feedback.
it is probably inherited from the variable naming convention from
v8
source - which usesk
prefix for variable names that are constants. For example: https://github.com/nodejs/node/blob/bfa6e37204f1343c8a340f44c923858833da55b8/deps/v8/include/v8.h#L433pls refer to hungarian notation for additional context.
/cc @addaleax to see if there is a better explanation.