Slackbot
08/26/2021, 3:21 AMiamthevoid
08/27/2021, 2:52 PMthis
reference in lazy { }
scope for extension val ? Something like that:
val String.something by lazy { "$this$this" }
LeoColman
08/29/2021, 6:07 PMval myList = listOf("A", "AA", "B", "BB")
val aIndices = myList.mapIndexedNotNull { index, str -> if("A" in str) index else null } // 0 and 1
Colton Idle
08/31/2021, 7:27 AMumar
08/31/2021, 6:25 PMMuhammad Zaryab Rafique
09/02/2021, 10:45 AMavolkmann
09/06/2021, 5:31 PMmyanmarking
09/09/2021, 10:29 AMhho
09/09/2021, 4:45 PMlouiscad
09/10/2021, 9:58 AMChachako
09/14/2021, 4:48 PMequals
, hashcode
, toString
, copy
, and others? Some things generated by data class
are not what I want, and even it only generate properties in the primary constructorScott Kruse
09/14/2021, 8:04 PMlist.firstOrNull { it is MySealedClass } != null
rtsketo
09/15/2021, 6:50 AMfun f(x: Int) = x * 15 + 30
so if we type f(10)
in our code would be replaced with 180
later on (or even instantly).
Not sure if it's ok to ask here, it seemed to me too random of a question to ask anywhere else.
Edit: Even if it's possible somehow with the @Deprecated
annotation, let me know.Chachako
09/16/2021, 6:51 AMinternal
modifier is only visible in a single module, this is sometimes not in line with my expectations.smit01
09/17/2021, 8:00 AMnapperley
09/17/2021, 10:33 PM/* FIXME: what the actual ****. */
This comment is in the Efl_Ui.h file on line 184 (part of the libefl-all-dev v1.23.3-8 Debian Package).elect
09/19/2021, 5:46 PMVadim Kuhay
09/21/2021, 1:20 AMScott Kruse
09/21/2021, 6:19 AMVikas Singh
09/22/2021, 7:16 PMFudge
09/24/2021, 7:02 PMHullaballoonatic
09/26/2021, 9:30 PMMarc Knaup
09/27/2021, 7:53 PMCheenu Soni
09/28/2021, 9:44 AMavolkmann
09/29/2021, 7:05 AMout var
in C#:
What do you think about partial classes?
They allow you to spread a class declaration over several files, which are merged together on build.
Do you see any good applications for this? Could you imagine it in other languages?theapache64
09/29/2021, 10:01 AMNikky
09/29/2021, 10:36 AMinline fun <reified T: FeatureSet> get(clazz: KClass<T> = T::class): T?
when i call it like so val a: Any? = foo.get()
i get the class FeatureSet
which is abstract
is there any way to forbid this syntax other than crashing at runtime ?Jason5lee
09/30/2021, 8:25 AMslf4j
a lot in Java but I’m not sure if there is a better solution for Kotlin specific.Marco Righini
09/30/2021, 11:35 AMrtsketo
10/05/2021, 6:41 AMpercent
.
How should a variable that's from 0 to 1 be called?