# Naming

## Overview

Since you need to understand the naming representation, e.g., whether it is an enum or let, consistency in naming is crucial.

### Naming Conventions

<table><thead><tr><th width="273">Naming Convention</th><th>Example</th></tr></thead><tbody><tr><td>Camel Case - Lower</td><td>sedatOnat</td></tr><tr><td>Camel Case - Upper</td><td>SedatOnat</td></tr><tr><td>Flat Case</td><td>sedatonat</td></tr><tr><td>Kebab Case</td><td>sedat-onat</td></tr><tr><td>Kebab Case - Screaming</td><td>SEDAT-ONAT</td></tr><tr><td>Kebab Case - ?</td><td>Sedat-Onat</td></tr><tr><td>Sentence Case</td><td>?</td></tr><tr><td>Snake Case</td><td>sedat_onat</td></tr><tr><td>Snake Case - Camel</td><td>sedat_Onat</td></tr><tr><td>Snake Case - Pascal</td><td>Sedat_Onat</td></tr><tr><td>Snake Case - Screaming</td><td>SEDAT_ONAT</td></tr><tr><td>Upper Case</td><td>SEDATONAT</td></tr></tbody></table>

### Swift Language Naming Convention

Although there are controversies, there is a convention on Swift naming, as you may see below.

<table><thead><tr><th width="128">Item</th><th width="175" data-type="checkbox">lowerCamelCase</th><th width="188" data-type="checkbox">UpperCamelCase</th><th data-type="checkbox">Start with Verb</th></tr></thead><tbody><tr><td>class</td><td>false</td><td>true</td><td>false</td></tr><tr><td>enum</td><td>true</td><td>false</td><td>false</td></tr><tr><td>func</td><td>true</td><td>false</td><td>false</td></tr><tr><td>let</td><td>true</td><td>false</td><td>false</td></tr><tr><td>protocol</td><td>false</td><td>true</td><td>false</td></tr><tr><td>struct</td><td>true</td><td>false</td><td>false</td></tr><tr><td>Type</td><td>false</td><td>true</td><td>false</td></tr><tr><td>var</td><td>true</td><td>false</td><td>false</td></tr></tbody></table>

### -ed

### A new Study

| Item     | Abbr-3 | Abbr-4 |
| -------- | ------ | ------ |
| class    | cls    | clas   |
| enum     | enm    | enum   |
| func     | fnc    | func   |
| let      | prl    | prpl   |
| protocol | prt    | prtc   |
| struct   | stc    | strc   |
| Type     | typ    | type   |
| var      | prv    | prpc   |

## Sources

### Videos

{% embed url="<https://www.youtube.com/watch?v=GztWJaGwMyA>" %}

### Articles / Documents

* [How to convert between camel case and snake case with Codable and keyEncodingStrategy](https://www.hackingwithswift.com/example-code/system/how-to-convert-between-camel-case-and-snake-case-with-codable-and-keyencodingstrategy)
* [Wikipedia / Naming convention (programming)](https://en.wikipedia.org/wiki/Naming_convention_\(programming\))
* [Swift.org / API Design Guidelines](https://www.swift.org/documentation/api-design-guidelines/)

## See also

*
