rafal
07/25/2017, 11:58 AMthis
is not meaningful enough you can use e.g. let()
rafal
07/25/2017, 11:58 AMval self = this
dsgryazin
07/25/2017, 12:02 PMval meaningfulName = this
is too verbose for such reasonskarelpeeters
07/25/2017, 12:03 PMthis
is perfectly clear. Can you give an example where it's not and you couldn't just replace it with a normal function?dsgryazin
07/25/2017, 12:10 PMthis
is enough only in short 1-2-3 liners, with almost no logic inside.karelpeeters
07/25/2017, 12:12 PMthis
. It has a very specific meaning in OOP. If your methods are so long you forget what this
refers to halfway through you're doing something wrong.dsgryazin
07/25/2017, 12:17 PMval
for naming an argument with extensions, thought there is no any limitation just for having an aliaskarelpeeters
07/25/2017, 12:18 PMpim
07/25/2017, 12:21 PMfun x(a: Int = 1)
used as x()
would be compiled as x(1)
.diesieben07
07/25/2017, 12:29 PMpim
07/25/2017, 12:30 PMdiesieben07
07/25/2017, 12:31 PMpim
07/25/2017, 12:32 PMdiesieben07
07/25/2017, 12:33 PMpim
07/25/2017, 12:34 PMdiesieben07
07/25/2017, 12:35 PMdiesieben07
07/25/2017, 12:37 PMigor.wojda
07/25/2017, 1:41 PMsum(*list)
Should we say arity is 1 or should new say that arity equals to number of elements in the list?damian
07/25/2017, 1:43 PMvararg
is really just syntactic sugar for an Array
argumentnhaarman
07/25/2017, 1:52 PMtoString()
, equals()
and hashCode()
methods myself 😕kingsley
07/25/2017, 1:54 PMnhaarman
07/25/2017, 2:23 PMhho
07/25/2017, 2:32 PMnhaarman
07/25/2017, 2:33 PMmartwy_kotek
07/25/2017, 2:54 PMfun
keyword instead of none like in java?rafal
07/25/2017, 2:57 PMfun
martwy_kotek
07/25/2017, 2:59 PMfoo()
is readable enoughiex
07/25/2017, 3:00 PMrafal
07/25/2017, 3:00 PM