https://kotlinlang.org logo
#random
Title
k

kirillrakhman

09/27/2017, 1:46 PM
https://www.reddit.com/r/Kotlin/comments/72ravi/nested_it_variable/ Interesting, OP knows how to use lambdas but doesn't know that you can name the parameters. I wonder what lead to this knowledge gap
d

davicdsalves

09/27/2017, 1:47 PM
i'm guilty as well. i am still new to kotlin, and i thought the same tbh :x
k

kirillrakhman

09/27/2017, 1:48 PM
interesting. how did you learn to use lambdas?
j

janvladimirmostert

09/27/2017, 1:49 PM
IDE autocompletion. I didn't know naming them either when I started until I read the docs
c

codeslubber

09/27/2017, 1:55 PM
Wow. Good example of how some form of basic training would benefit people. Or good examples.
d

davicdsalves

09/27/2017, 2:02 PM
idk, maybe I thought the it was something specific in kotlin and couldn't change it? but in java i'm used to give good names to the lambdas variables.
k

kirillrakhman

09/27/2017, 2:04 PM
@codeslubber only if people actually read them
1
I think many kotlin resources, e.g. blogs assume a lot of prior (java) knowledge and expect the reader to transfer it seamlessly
j

janvladimirmostert

09/27/2017, 2:06 PM
@kirillrakhman often times you just want to get started with something, then you figure out just enough to be able to build something after which you slow down your learning. Autocomplete when it gives you a
forEach {  }
, you assume that's how it is and the only way to access the item is via
it
.
Ctrl-Space-driven-development
1
k

kirillrakhman

09/27/2017, 2:08 PM
@janvladimirmostert I absolutely get it. Great autocompletion (or tooling at all) is a curse and blessing
2
j

janvladimirmostert

09/27/2017, 2:10 PM
@kirillrakhman indeed, Netbeans helped me to learn Java in the same way the Delphi IDE helped me learn just enough Delphi back in the days to finish a project. If you need to get up and running quickly, a great IDE can get you far enough to be able to deliver something
a

alex.hart

09/27/2017, 4:42 PM
He seems to know, in his second example in the post (unless he updated it)
3 Views