ddavison
ddavison

Reputation: 29032

What are the names of these coding styles?

I am trying to explain different coding styles to some individuals I am training. The only issue is, I don't know the semantic name for these 2 styles of programming.

For example, I know that this is GNU:

class Object
{
    // statements
}

I need help defining these two:

class Object {

}

and this variable naming style:

string sNotHungarianNotation = "";
string but_this_style        = "";

where the variables have underscores between them.

I'd appreciate the help. I've looked at several different sources but could not come to a cogent answer.

Upvotes: 0

Views: 128

Answers (1)

Amber
Amber

Reputation: 526763

As far as names for brace positioning, if you really care about them, Indent style on Wikipedia has far more info than you'll probably ever care about. That said, your two examples are typically referred to as Allman style and K&R style, respectively.

For variable naming, your first example is typically called camelCase and the second version is often referred to as snake_case.

Upvotes: 4

Related Questions