Kotlin guidelines next rulez

This commit is contained in:
Martin Blazik
2020-09-30 16:17:29 +02:00
parent fba329653d
commit f8b6812990

View File

@@ -1,3 +1,22 @@
# Kotlin Coding Guidelines
## Code structure
- short methods (not too long)
- add suggestion how to refactor
- only one level of abstraction
keep only one abstraction level in method
- keep low level of identation
less is more
for example when() if-else if-else is not very good redable
- use variable for expression / condition
## Questions
### `value.?let` or `if (value != null)`
Is really better to use
@@ -24,4 +43,3 @@ val value = object : Type {
// implementation
}
```