Naming Conventions Across Programming Languages

Опубликовано: 04 Февраль 2025
на канале: Code Murals
72
3

Naming conventions in programming are guidelines on how to name variables, functions, classes, and other elements in your code.

Camel Case: myVariableName, calculateTotalAmount()
The first letter of the identifier is lowercase, and each subsequent concatenated word begins with a capital letter.

Pascal Case: MyClass, CalculateTotalAmount()
Like Camel Case, but the first letter is also capitalized.

Hungarian Notation: strName, intCounter
Prefixes or type indicators are added to variable names to denote their types. For example, using "str" for strings, "int" for integers.

Prefixes IInterfaceName, AbstractClassName
Adding prefixes to indicate the type of element. For example, "I" for interfaces, "Abstract" for abstract classes.

Snake Case: my_variable_name, calculate_total_amount()
Words are written in lowercase, separated by underscores.

Kebab Case: my-variable-name, calculate-total-amount()
Similar to Snake Case, but words are separated by hyphens.

Screaming Snake Case
MAX_VALUE, MIN_VALUE
All capital letters with words separated by underscore

#CodeNaming
#ProgrammingStyle
#NamingConventions
#CodeStandards
#CodeReadability
#CleanCode
#CodeBestPractices
#SyntaxConsistency
#DevNaming
#ProgrammingGuidelines
#CodeQuality
#DevStyle
#ProgrammingPatterns
#NamingPatterns
#LanguageSyntax
#ProgrammingTips
#NamingWisdom
#DevStandards
#SyntaxClarity
#CodeOrganization