Naming convention for static member variables

# Simon Fraser (4 days ago)

class Foo { static bool thing. };

What's the naming convention for static member variables like this? I've seen m_foo, which seems positively harmful. I've seen s_foo, which I like.

There are 165 instances of s that I can find in the project. There are 17 instances of static m.

Simon

Contact us to advertise here
# Konstantin Tokarev (4 days ago)

19.02.2020, 22:31, "Simon Fraser" <simon.fraser at apple.com>:

class Foo { static bool thing. };

What's the naming convention for static member variables like this? I've seen m_foo, which seems positively harmful. I've seen s_foo, which I like.

There are 165 instances of s that I can find in the project. There are 17 instances of static m.

According to [1], convention is "s_". Apparently, it just lacks an enforcement in style checker.

[1] webkit.org/code-style-guidelines/#names

# Simon Fraser (4 days ago)

Want more features?

Request early access to our private beta of readable email premium.