Question about code formatting

Just curious why PascalCase is the naming standard for variables as opposed to camelCase ?

That’s something that only EPIC might have an answer for…

C++ doesn’t have a standard naming convention. All companies would have adopted their own; and that’s what Epic settled on.

(Personally, I hate camelCase, IMO it’s the second worst style - first being ALL_CAPS which makes it the perfect style for macros).

ALL_CAPS for macros is so old an convention it might even predate C (for languages of that time that were case sensitive, anyway).

Personally I like to have a distinction between types and methods, and variables (as is done in C# as used in Unity)…

In the end it’s a matter of getting used to one style that is used in a project and stay consistent with other peoples’ code… One might not like it but being the “odd one” whose code always sticks out isn’t helping anyone, either…

(Interestingly, Golang has a styleguide for code formatting that comes with the language and the toolset includes a formatter and the compiler will issue at least warnings if the formatting doesn’t comply to the style…)

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms