[webkit-dev] Coding convention of constants

Scott Thompson easco at mac.com
Thu Jul 9 20:09:30 PDT 2009


On Jul 8, 2009, at 11:08 PM, KwangYul Seo wrote:

> I found another style which starts with "k".
>
> [4] platform/chromium/PopupMenuChromium.cpp
>
> static const int kMaxVisibleRows = 20;
> static const int kMaxHeight = 500;
> static const int kBorderSize = 1;
> static const TimeStamp kTypeAheadTimeoutMs = 1000;

For what it's worth, the convention of adding "k" to the beginning of  
constants was an artifact of the "Classic" Mac OS APIs (those that  
became Carbon).

Scott



More information about the webkit-dev mailing list