Size: a a a

Kotlin Community

2019 October 26

i

iseki in Kotlin Community
This is the problem...
источник

LS

Leonid Startsev in Kotlin Community
iseki
But args are in different type...
(Int, String) -> Unit is fun f(i: Int, s: String)
источник

LS

Leonid Startsev in Kotlin Community
vararg can't be of different types
источник

i

iseki in Kotlin Community
Maybe I need fun <vararg T>aaa(vararg t:T)
источник

AN

Alexander Nozik in Kotlin Community
iseki
But args are in different type...
(Array<Any>)->Unit and forget about type checks. But you are doing something wrong
источник

i

iseki in Kotlin Community
Sorry, left IDEA, I write lot of wrong code.
источник

i

iseki in Kotlin Community
Alexander Nozik
(Array<Any>)->Unit and forget about type checks. But you are doing something wrong
😢
источник

i

iseki in Kotlin Community
Alexander Nozik
(Array<Any>)->Unit and forget about type checks. But you are doing something wrong
I think it's a bad way for it. Maybe I should open an issue in Kotlin language design discuss
источник

AN

Alexander Nozik in Kotlin Community
iseki
I think it's a bad way for it. Maybe I should open an issue in Kotlin language design discuss
nope. You should explain what do you want to do. Because problem is not with design, but with what you do with it. Probably also better to do it in forum
источник

i

iseki in Kotlin Community
Thank you very much.
источник

i

iseki in Kotlin Community
Maybe auto construct-deconstruct is good way for it? auto construct args to data class anonymous
источник

AN

Alexander Nozik in Kotlin Community
You should describe actual problem you are trying to solve, not the way you are solving it.
источник

i

iseki in Kotlin Community
iseki
I want to write a function like:
fun throttle(threshold: Int, lambda: ()->Unit)
The problem is  I want to write this function one time. Cover any number of parameters.
источник

AN

Alexander Nozik in Kotlin Community
iseki
The problem is  I want to write this function one time. Cover any number of parameters.
The question is where you will use it, not how to write it.
источник

i

iseki in Kotlin Community
Yeah, if  catch Exception in n times during x seconds. The program should abort
источник

QH

Quantum Harmonizer in Kotlin Community
Looks like a functional decorator...
источник

D

Denys in Kotlin Community
А это у меня одного play.kotlinlang не работает?
источник

D

Denys in Kotlin Community
При запуске скетча показывает панельку исполнения, бежит прогресс и панелька закрывается.
источник

D

Denys in Kotlin Community
В консоли ничего.
источник

BP

Bogdan Panchenko in Kotlin Community
все ок
источник