tschuchort
10/29/2017, 3:46 PMkarelpeeters
10/29/2017, 3:47 PMMyClass<SELF: Myclass<SELF>>
.Marc Knaup
10/29/2017, 4:09 PMUpperCamelCase
for them as they reflect types.
The name must reflect the purpose of the parameter.
So Kotlin’s default `map`:
fun <T, R> Iterable<T>.map(transform: (T) -> R): List<R>
I’d write as
fun <Value, TransformedValue> Iterable<Value>.map(transform: (Value) -> TransformedValue): List<TransformedValue>
It’s clearly longer but I’ve learned from Swift that “Clarity is more important than brevity”. And that’s true! 🙂
(https://swift.org/documentation/api-design-guidelines/#clarity-over-brevity)