Andrew Gazelka
01/29/2019, 7:11 PMDataClass.() -> Unit
versus doing (DataClassParam1,DataClassParam2,DataClassParam3,...) -> Unit
.snowe
01/30/2019, 2:03 AMsnowe
01/30/2019, 2:04 AMjavaClass.getResource("naughty_strings.txt") must not be null
java.lang.IllegalStateException: javaClass.getResource("naughty_strings.txt") must not be null
at com.tylerthrailkill.helpers.prettyprint.LoadResourcesTest$1$1$1.invoke(LoadResourcesTest.kt:10)
at com.tylerthrailkill.helpers.prettyprint.LoadResourcesTest$1$1$1.invoke(LoadResourcesTest.kt:7)
snowe
01/30/2019, 2:14 AMJukka Siivonen
01/30/2019, 7:51 AMprojectmoon
06/07/2019, 4:05 PMrepeat
function, but it takes unitprojectmoon
06/07/2019, 4:05 PMrepeat
that returns its valuesRuckus
06/07/2019, 4:06 PMList(count) { index -> ... }
projectmoon
06/07/2019, 4:06 PMprojectmoon
06/07/2019, 4:06 PMprojectmoon
06/07/2019, 4:07 PMRuckus
06/07/2019, 4:08 PMprojectmoon
06/07/2019, 4:09 PMsksk
06/07/2019, 6:24 PMkarelpeeters
06/07/2019, 6:40 PMfun foo() = MyInlineClass(1, 2)
now what?karelpeeters
06/07/2019, 6:40 PMshikasd
06/07/2019, 7:53 PMinline class
tries to use the field directly, without "boxing" it. with one field it can easily remove the class at compile time and replace it with field value, but it is rather confusing for two fields or more.Hexa
06/09/2019, 4:03 PMkotlinc /mydir/kotlin-dsl/samples/hello-kotlin/src/main/kotlin/samples/HelloWorld.kt -include-runtime -d tester.jar
//HelloWorld.kt file
package samples
fun main(args: Array<String>) {
val p = Parser()
println(p.hello())
}
class Parser {
fun hello(): String {
return "Hello world"
}
}
Hexa
06/09/2019, 4:03 PM// HelloWorld.kt file
package samples
fun main(args: Array<String>) {
val p = Parser()
println(p.hello())
val person = Person("me")
}
class Parser {
fun hello(): String {
return "Hello world"
}
}
// Person.kt file
data class Person(val name: String)
Robert
06/10/2019, 9:29 AMuser
06/10/2019, 11:13 AMxenoterracide
06/10/2019, 3:58 PMthiagoretondar
06/10/2019, 4:33 PMAndrew Gazelka
06/10/2019, 11:51 PMasync
with suspending delegates? Have a better idea on how I could do this? (Need delegates because the value stored in the delegate would be changing)louiscad
06/11/2019, 7:31 AMtypealias
?user
06/11/2019, 9:30 AMwhen
used as expressions, return a value. It's often useful to use them over statements. https://pl.kotl.in/SJb4pXQTm https://pbs.twimg.com/media/D8sZOMxXYAALWn3.png▾
karelpeeters
06/11/2019, 10:15 PMchansek
06/12/2019, 1:55 PMchansek
06/12/2019, 1:57 PMShawn
06/12/2019, 2:01 PM