Size: a a a

Kotlin Community

2020 March 16

M

Mi in Kotlin Community
Alexander Nozik
I agree, but I still think it is not correct to call it a primary constructor body
I think of it in a way that you cannot create a class without calling a primary constructor either explicitly or implicitly (if this constructor have no parameters), so there is a direct  relation, also there is no any other syntax to define the primary constructor body
источник

AN

Alexander Nozik in Kotlin Community
Mi
I think of it in a way that you cannot create a class without calling a primary constructor either explicitly or implicitly (if this constructor have no parameters), so there is a direct  relation, also there is no any other syntax to define the primary constructor body
OK, it is a matter of terminology. I prefer to think that primary constructor does not have a body, it is just a way to pass parameters
источник

ZB

Zaigham Baig in Kotlin Community
Alexander Nozik
More or less. You can use it for more complicated initialization logic, but the experience shows that it is better to use factory methods for that.
Factory methods?
I have used them to create Instance of a class.
Define Factory methods and Auxiliary methods?
источник

AN

Alexander Nozik in Kotlin Community
There are a lot of different articles about it, but basically, when you need some complicated initialization logic, you'd better create a function that does the logic and passes already initialized parameters to constructor. In kotlin you can make method look like constructor by placing operator fun invoke to the companion object, but it is not always the best solution. Companion build function is more explicit.
источник

ZB

Zaigham Baig in Kotlin Community
Alexander Nozik
There are a lot of different articles about it, but basically, when you need some complicated initialization logic, you'd better create a function that does the logic and passes already initialized parameters to constructor. In kotlin you can make method look like constructor by placing operator fun invoke to the companion object, but it is not always the best solution. Companion build function is more explicit.
Thank you :)
источник
2020 March 17

AN

Alexander Nozik in Kotlin Community
У меня withJava упорно ломает идею на мультиплатформе. Раньше как-то это лечил, но сейчас чего-то ничего не помогает. Есть методы?
источник

AN

Alexander Nozik in Kotlin Community
Пересоздание проект вроде помогло...
источник

AE

Alexandr Emelyanov in Kotlin Community
Alexander Nozik
Пересоздание проект вроде помогло...
В любой непонятной ситуации удаляем .idea, *.iml🌚
источник

AN

Alexander Nozik in Kotlin Community
Alexandr Emelyanov
В любой непонятной ситуации удаляем .idea, *.iml🌚
Вот оно не помогло. Помогло, когда отключил все сделал реимпорт и включил обратно
источник

AN

Alexander Nozik in Kotlin Community
чего-то там где-то еще кешировалось
источник

BV

Boris Vanin in Kotlin Community
Идея же умеет пересоздать проект если грейдловый файлик открыть
источник

BV

Boris Vanin in Kotlin Community
Как проект
источник

AN

Alexander Nozik in Kotlin Community
Ну да, но вот прям изнутри не получилось. Снести директорию и перезагрузить идею помого бы наверное
источник

SZ

Sergey Zolotov in Kotlin Community
источник

VT

Vsevolod Tolstopyatov in Kotlin Community
только этот PR откатили :)
источник

SZ

Sergey Zolotov in Kotlin Community
Vsevolod Tolstopyatov
только этот PR откатили :)
грусть. ну прогресс есть уже радует)
источник

SZ

Sergey Zolotov in Kotlin Community
https://github.com/Kotlin/kotlinx.coroutines/releases/tag/1.3.5

- Flow.firstOrNull operators
- java.time and kotlin.time.Duration adapters
- More performant and configurable DebugProbes for usages in production environment
- kotlin-coroutines-jdk9 module for integration with java.util.concurrent.Flow
- Various bug fixes and improvements
источник

AN

Alexander Nozik in Kotlin Community
Sergey Zolotov
https://github.com/Kotlin/kotlinx.coroutines/releases/tag/1.3.5

- Flow.firstOrNull operators
- java.time and kotlin.time.Duration adapters
- More performant and configurable DebugProbes for usages in production environment
- kotlin-coroutines-jdk9 module for integration with java.util.concurrent.Flow
- Various bug fixes and improvements
О, а вот интеграция с java.concurrent мне как раз нужна
источник
2020 March 18

KZ

Konstantin Zolotov in Kotlin Community
Блин-блин-блин, а вот это вообще ждать в обозримом будем, кто-нибудь в курсе?
https://github.com/Kotlin/kotlinx.coroutines/issues/1261
источник

AN

Alexander Nozik in Kotlin Community
А что именно из этого нужно?
источник