PascalCase |
camelCase |
kebab-case |
snake_case |
strHungarianNotation |
** | exponential |
% | remainder |
?? | nullish coalescing |
?. | optional chaining / null-safe |
1 | Edit time |
2 | Compile time |
3 | Link time |
4 | Distribution time |
5 | Installation time |
6 | Load time |
7 | Runtime |
1 byte = 8 bits |
4 bits = 1 nibble |
Digits | Unique values | 1 byte's first value | 1 byte's last value | |
Binary | 01 | 2 ** 8 = 256 | 0 | 1111 1111 |
Decimal | 0123456789 | 10 ** 8 | 0 | 255 |
Hex | 0123456789ABCDEF | 16 ** 8 | 0 | FF |
Binary | Decimal | Hex | Binary | Decimal | Hex |
0000 | 0 | 0 | 1000 | 8 | 8 |
0001 | 1 | 1 | 1000 | 9 | 9 |
0010 | 2 | 2 | 1010 | A | |
0011 | 3 | 3 | 1011 | B | |
0100 | 4 | 4 | 1100 | C | |
0101 | 5 | 5 | 1101 | D | |
0110 | 6 | 6 | 1110 | E | |
0111 | 7 | 7 | 1111 | F |
Int | |
Unsigned | + |
Signed | + and - |
Function | func myFunc(): bool { // do this // do that // always return return true } |
Subroutine | func myFunc(): void { // do this // do that // do not return } |
Callback | func myFunc(callback) { callback('param') } |
Closure | func myFunc(x) { return anotherFunc(y) { // this anotherFunc is the closure return x + y } } |
Higher-order | func higherOrder { print(getFunc(), 10) } func print(getFunc, val) { getFunc(val) } func getFunc(val) {} |
Recursion | func myFunc() { myFunc() } |
Pure | func f(x) { // does not depend on external factors return x + 2 } |
Impure | y = 1 func f(x) { // depends on external factors return x + y + 2 } |
MAJOR.MINOR.PATCH
MAJOR | Major update |
MINOR | New feature |
PATCH | Bugfix |
^1.0.1 |
|
~1.0.1 |
|
1.0.1 |
|
UUID | Universally Unique Identifier | 2e1a887d-991a-4760-b035-bd7766e1f498 | |
KSUID | Key-Sortable Unique Identifier | has a timestamp at its beginning | 0ujsszwN8NRY24YaXiTIE2VWDTS |
Untyped | Operations regardless of type | |
Typed | Operations specific to that data type | |
Static | Types associated with variables | |
Dynamic | Types associated with values | |
Explicit | Explicit type declaration | |
Implicit | Implicit type declaration | |
Strong | Can't change variable type | |
Weak | Can change variable type | |
Nominal | Type attached to name | |
Structural | Type attached to structure | |
Type-Safe | Undefined behaviors throw errors |
HTML, CSS, SQL | Untyped |
JS | Typed, Dynamic, Implicit, Weak, Nominal |
TS | Typed, Static, Explicit, Strong, Structural |
Python | Typed, Dynamic, Implicit, Weak, Nominal |
PHP | Typed, Dynamic, Implicit, Weak, Nominal |
Go | Typed, Static, Implicit, Strong, Structural |
C | Typed, Static, Explicit, Weak, Nominal |
Java | Typed, Static, Explicit, Strong, Nominal |
C# | Typed, Static, Explicit, Strong, Nominal |
Rust | Typed, Static, Implicit, Strong, Structural |