๐ Case Naming Convention
์ฝ๋ฉํ ๋ ํด๋์ค๋ช ์ด๋ ํจ์๋ช , ๋ณ์๋ช ๋ฑ์ ๋ช ๋ช ํ ๋ coding convention์ ๋ง์ถฐ์ผ ํ ๋๊ฐ ์๋ค.
camelCase๋ฅผ ์ฐ์ธ์~ ์ด๋ด ๋ ์ด๋ป๊ฒ ์จ์ผํ๋๊ฐ?
๋ชจ๋ case๋ค์ ์ ๋ฆฌํด๋ดค๋ค.
Formatting | Name(s) |
namingidentifier | flat case/Lazy Case |
NAMINGIDENTIFIER | upper flat case |
namingIdentifier | (lower) camelCase, dromedaryCase |
NamingIdentifier | (upper) camelCase, PascalCase, StudlyCase, CapitalCamelCase |
naming_identifier | snake_case, pothole_case, C case |
Naming_Identifier | Camel_Snake_Case |
NAMING_IDENTIFIER | SCREAMING_SNAKE_CASE, MACRO_CASE, UPPER_CASE, CONSTANT_CASE |
naming-identifier | kebab-case/caterpillar-case/dash-case, hyphen-case, lisp-case, spinal-case and css-case |
NAMING-IDENTIFIER | TRAIN-CASE, COBOL-CASE, SCREAMING-KEBAB-CASE |
Naming-Identifier | Train-Case, HTTP-Header-Case |
_namingIdentifier | Undercore Notation (prefixed by "_" followed by camelCase) |
datatypeNamingIdentifier | Hungarian Notation (variable names Prefixed by metadata data-types which is out-dated) |
*์์ฃผ ์ฐ์ด๋ Case naming convention์ ๋ํ ์ค๋ช
1) lowerCamelCase: lowercase ๋ฌธ์๋ก ์์ํ๋ฉฐ, ์ฐ์ด์ ๋จ์ด์ ์ฒซ ๋ฌธ์(letter)๋ ๋๋ฌธ์๋ก ํ์ํจ.
์) camelCaseVar
2) UpperCamelCase (=PascalCase): ๋ชจ๋ ๋จ์ด(word)์ ์์์ ๋๋ฌธ์(uppercase)๋ก ์์ํจ.
์) PascalCaseVar
3) snake_case: ๋ชจ๋ ๊ณต๋ฐฑ(space)์ "_"๋ก ํ์ํ๋ฉฐ, ๋ชจ๋ ๋จ์ด๋ ์๋ฌธ์(lowercase)์.
์) snake_case_var
4) UPPER_CASE_SNAKE_CASE: ๋ชจ๋ ๊ณต๋ฐฑ(space)์ "_"๋ก ํ์ํ๋ฉฐ, ๋ชจ๋ ๋ฌธ์(letter)๋ ๋๋ฌธ์(capital)๋ก ํ์ํจ.
์) UPPER_CASE_SNAKE_CASE_VAR
5) kebab-case: ๋ชจ๋ ๊ณต๋ฐฑ(space)์ "-"๋ก ํ์๋๋ฉฐ, ๋ชจ๋ ๋ฌธ์(letter)๋ ์๋ฌธ์(lowercase)์.
์) kebab-case-var
-์ฐธ๊ณ ๋ฌธํ
์คํ์ค๋ฒํ๋ก์ฐ, What are the different kinds of cases?
What are the different kinds of cases?
I'm interested in the different kinds of identifier cases, and what people call them. Do you know of any additions to this list, or other alternative names? myIdentifier : Camel case (e.g. in java
stackoverflow.com
์ผ์ด์ค ๋ค์ด๋ฐ ์ปจ๋ฒค์ (Case naming convention)
์ผ์ด์ค ๋ค์ด๋ฐ ์ปจ๋ฒค์ (Case naming convention)
๋ค์ด๊ฐ๋ฉฐ์ฝ๋๋ฅผ ์งค ๋๋ง๋ค ๋ณ์์ ์ด๋ป๊ฒ ๋ค์ด๋ฐ์ ํค์ผ ํ ๊ฒ์ธ์ง๊ฐ ๊ณ ๋ฏผ์ด์๋ค. ๊ทธ ์ค์์๋ ๊ฐ์ฅ ๋จผ์ ์ฒด๊ณ๋ฅผ ์ก์์ค์ผ ํ๋ ๊ฒ์ด ์ผ์ด์ค ๋ฌธ์ ์ธ๋ฐ, ์ธ์ด๋ง๋ค ๊ถ์ฅํ๋ ์ผ์ด์ค๋ ๋ค๋ฅด๊ณ , ํ
guswnsxodlf.github.io
'Computer Science > ๊ธฐํ(์์คํ ์ค๊ณ ๋ฑ)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
์น/์ฑ ์๋น์ค ๊ธฐํ ์์ (0) | 2021.08.27 |
---|---|
C, C++, ์๋ฐ, ํ์ด์ฌ์์ ์ฌ์ฉํ ์ ์๋ ๋ณ์๋ช ์กฐ๊ฑด (0) | 2021.06.30 |
[Porting] C++์ Python ์ฐจ์ด์ ์ ๋ฆฌ (C++ vs Python) (2) | 2021.06.11 |
์์คํ ์ค๊ณ ๋ฐ ๊ท๋ชจ ํ์ฅ์ฑ ๋ฌธ์ ๋ค (0) | 2021.02.06 |
๋๊ธ0