https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
stdlib
  • e

    elect

    11/11/2020, 12:39 PM
    sumOf{..}: Float
    , there are Int, Long, UInt, ULong, Double, BigDecimal, BigInteger but Float is missing
    🤣 1
    e
    • 2
    • 18
  • h

    holgerbrandl

    11/29/2020, 6:40 PM
    In what situations may
    Number.toDouble()
    "involve rounding" as suggested by its API docs?
    e
    l
    • 3
    • 11
  • p

    poohbar

    11/29/2020, 9:13 PM
    Is there any chance Kotlin could "synthetize" named arguments for Java libraries? Some libraries I use take many arguments of the same type so order matters. It would be great if I could explicitly name the arguments.
    j
    e
    • 3
    • 4
  • n

    nkiesel

    12/04/2020, 8:11 PM
    Why do we not have a
    buildString
    which takes a separator as an optional parameter? Right now I use e.g.
    buildList { ... add(..) }.joinToString(" ")
    but
    buildString(" ") { ... add(...) }
    would be nicer. And perhaps also supports the "prefix" and "suffix" from Java's
    StringJoiner
    ?
    👍 1
    ➖ 7
    l
    a
    • 3
    • 3
  • a

    Abduqodiri Qurbonzoda [JB]

    12/08/2020, 9:46 AM
    Hi everyone! Please share your feedback on this proposal: https://github.com/Kotlin/KEEP/issues/227
    f
    • 2
    • 1
  • t

    tapchicoma

    12/08/2020, 8:14 PM
    With regard to new
    java.nio.file.Path
    extensions in stdlib will it make sense to add new
    PathTreeWalk
    class similar to
    FileTreeWalk
    ? I know nio has
    walkFileTree()
    method, but it does not produces
    Sequence
    .
    i
    • 2
    • 1
  • d

    Derek Peirce

    12/10/2020, 4:37 AM
    I propose adding the following method to the stdlib:
    public inline fun <T1, T2: Comparable<T2>> compareBy(crossinline selector: (T1) -> T2): Comparator<T1> =
            Comparator { a, b -> selector(a).compareTo(selector(b)) }
    This looks similar to the existing `compareBy`:
    public inline fun <T> compareBy(crossinline selector: (T) -> Comparable<*>?): Comparator<T> =
        Comparator { a, b -> compareValuesBy(a, b, selector) }
    But the type ambiguity and nullability make it inefficient, as it needs to box primitives. I ran a benchmark comparing the two
    compareBy
    implementations for finding the maximum of100,000 objects by their random int fields, and got these results:
    Benchmark                                           (N)  Mode  Cnt  Score   Error  Units
    ComparatorBenchmarkPrimitiveHelper.maxKt         100000  avgt   10  2.824 ± 0.102  ms/op
    ComparatorBenchmarkPrimitiveHelper.maxPrimitive  100000  avgt   10  0.381 ± 0.155  ms/op
    The results speak for themselves, the mass boxing and unboxing in the existing implementation has major performance implications and ought to be prevented with a more specialized
    compareBy
    method. This naturally extends to the methods that use it such as
    sortBy
    and
    sortedBy
    (I ran the benchmark using
    maxBy
    because it gave the most contrast,
    sortBy
    spent more time on intermediate operations). Strangely,
    maxBy
    and similar already require non-null values and work as they are.
    i
    • 2
    • 3
  • m

    Marc Knaup

    12/17/2020, 2:49 PM
    Suggestion:
    ClosedRange<T>.mapBounds()
    val range = 1 .. 10
    val shiftedRange = range.mapBounds { it + 10 } // = 11 .. 20
    val characters = "a" .. "z"
    val uppercaseCharacters = characters.mapBounds { it.toUpperCase() } // == "A" .. "Z"
    fun <T : Comparable<T>, R : Comparable<R>> ClosedRange<T>.mapBounds(transform: (T) -> R): ClosedRange<R> =
        transform(start) .. transform(endInclusive)
    
    // plus overloads for primitive ranges
    a
    • 2
    • 7
  • s

    Slackbot

    12/18/2020, 10:26 PM
    This message was deleted.
    d
    • 2
    • 1
  • b

    Ben

    12/22/2020, 12:03 AM
    Not sure if this is where to ask but how do we handle delegation with default methods. It seems kotlin tries to call the default method on the interface instead of the passed in implementation. This is with a java interface and java final implementation (AWS SqsAsyncClient and DefaultSqsAsyncClient). I would have assumed that the method would be called on the java implementation first.
    m
    • 2
    • 3
  • m

    mbonnin

    01/01/2021, 6:22 PM
    Do I need to enable a flag to use
    MutableList.removeLast
    ? The IDE finds it but I get an error at compile time:
    Unresolved reference: removeLast
    . I'm using Kotlin 1.4.10 (And Happy New Year !! 🎉 🌟 )
    l
    • 2
    • 35
  • h

    holgerbrandl

    01/09/2021, 8:38 PM
    Is there an alternative for
    repeat
    that allows to assign the result:
    val created = repeat(n){ create_something()}
    ? Doing
    (1..n).map{ create_something() }
    does not feel elegant. I can certainly create it myself with
    fun <T> repeat(n:Int, builder: (Int) -> T) = (1..n).map{ builder(it)}
    but I wonder why it's not part of stdlib? It also does not really work well, because somehow it's not resolved when being placed in some other source file that is different from that which contains the call site.
    m
    e
    l
    • 4
    • 6
  • h

    holgerbrandl

    01/10/2021, 1:46 PM
    What are the odds that inline classes could be dropped from kotlin in a future release? In other words: It is safe to build a library using inline classes? Clearly, I don't mind the API changes that may come down the road nor its experimental status as of now, I'm just curious about the future of this feature in general.
    d
    r
    +2
    • 5
    • 5
  • m

    mbonnin

    01/13/2021, 4:27 PM
    Is there a specific reason why
    Set<T>.map {}
    returns a
    List
    and not a
    Set
    ?
    z
    r
    j
    • 4
    • 10
  • l

    LeoColman

    01/22/2021, 2:43 AM
    Why isn't there a
    map.merge
    function? (or if there is, why can't I find it? xD) in plain Java it exists . I'm in a Kotlin JVM project
    g
    • 2
    • 10
  • h

    holgerbrandl

    01/22/2021, 8:29 PM
    Hi there. When using a mutable map, why can't I do
    map.getOrDefault(key){ ... build default value lazily here .. }
    similar to how the message is evaluated in
    require
    ?
    s
    • 2
    • 2
  • h

    holgerbrandl

    01/22/2021, 9:04 PM
    Are there any plans to support determinism in the stdlib collection methods? E.g. by setting/reseeding the internal 
    kotlin.random.Random.Default
    so that running
    listOf(1,2,3).shuffled()
    twice would give the same result. Controlling randomess is an important feature of every language that is intended for data-science (see https://www.w3schools.com/python/ref_random_seed.asp for python or https://www.rdocumentation.org/packages/simEd/versions/1.0.3/topics/set.seed for R
    s
    d
    i
    • 4
    • 7
  • s

    simon.vergauwen

    02/05/2021, 10:05 AM
    In the standard library
    public fun <T> maxOf(a: T, vararg other: T, comparator: Comparator<in T>): T
    is conflicting with
    public actual fun <T : Comparable<T>> maxOf(a: T, vararg other: T): T
    for me 🤔 Even when
    T
    isn't
    : Comparable<T>
    . This is only fixed for me when moving the
    comparator
    parameter before the
    vararg
    one. Is this a known issue? I'm trying to define
    sort
    for
    Comparable
    and
    Comparator
    in Arrow to deprecate the
    Order
    typeclass into something more Kotlin idiomatic, but following the same patterns as the Kotlin Std I ran into this issue when writing tests.
    i
    • 2
    • 5
  • s

    simon.vergauwen

    02/05/2021, 12:33 PM
    Also, I was thrown off by the following. Is this expected?
    (Double.NaN == Double.NaN).let(::println) // false
    (listOf(Double.NaN) == listOf(Double.NaN)).let(::println) // true
    h
    i
    +2
    • 5
    • 10
  • e

    elect

    02/08/2021, 11:51 AM
    String.toCamelCase()
    and
    String.toSnakeCase
    , related
    ➕ 3
    f
    • 2
    • 1
  • z

    Zac Sweers

    02/08/2021, 6:29 PM
    then cry when literally any of these hit an acronym
    😂 6
    f
    • 2
    • 1
  • p

    poohbar

    02/10/2021, 3:30 AM
    inline fun succeeded(block: () -> Unit): Boolean {
        return try {
            block()
            true
        } catch (e: Exception) {
            false
        }
    }
    s
    • 2
    • 1
  • d

    Dmitry Kandalov

    02/10/2021, 11:27 PM
    Why some functions in stdlib start with a capital letter when the name matches return type (as described in the coding conventions) but some don’t? For example, uppercase
    List
    but lowercase `sequence`:
    List(size = 1) { "foo" }
    sequence { yield("foo") }
    m
    e
    j
    • 4
    • 9
  • h

    holgerbrandl

    02/18/2021, 7:19 PM
    How would you name an extension on
    Number
    that trims it at 0, that is
    if(it<0) 0 else it
    ?
    a
    • 2
    • 2
  • p

    pniederw

    03/08/2021, 5:39 AM
    Are there any benchmarks comparing https://github.com/Kotlin/kotlinx.collections.immutable to JVM alternatives (Capsule, Paguro, Bifurcan)?
    j
    c
    • 3
    • 3
  • i

    ilya.gorbunov

    03/10/2021, 12:33 PM
    Hi there! What do you think about the collection builder functions,
    buildList
    ,
    buildSet
    and
    buildMap
    , introduced as experimental in 1.3.70? Do you use them in your code? What are your impression of them?
    t
    z
    +9
    • 12
    • 27
  • n

    nkiesel

    03/15/2021, 6:27 PM
    why is there no
    String.replaceLast
    which does the same as
    String.replaceFirst
    but for the last occurrence? We have "first/last" matching pairs for other methods.
    👍 3
    z
    l
    z
    • 4
    • 8
  • s

    sergio mongelat

    03/18/2021, 12:12 AM
    is there any function like this?
    fun Int.coerceIn(minMax: Int): Int {
        val abs = minMax.absoluteValue
        return coerceIn(-abs, abs)
    }
    z
    m
    f
    • 4
    • 7
  • s

    scaventz

    03/19/2021, 2:04 PM
    How can I view sample code of stdlib?...
    a
    f
    m
    • 4
    • 6
  • l

    louiscad

    03/26/2021, 1:49 PM
    My fingers are lazy, and typing parentheses on a QWERTY keyboard requires 2 hands (or streching). Consequently, I'd like the following to be provided in Kotlin stdlib out of the box:
    val TODO: Nothing inline get() = TODO()
    The lowercase version could also be nice.
    ❤️ 3
    🆒 1
    z
    t
    +4
    • 7
    • 56
Powered by Linen
Title
l

louiscad

03/26/2021, 1:49 PM
My fingers are lazy, and typing parentheses on a QWERTY keyboard requires 2 hands (or streching). Consequently, I'd like the following to be provided in Kotlin stdlib out of the box:
val TODO: Nothing inline get() = TODO()
The lowercase version could also be nice.
❤️ 3
🆒 1
z

Zach Klippenstein (he/him) [MOD]

03/26/2021, 2:01 PM
Sometimes I think about making an alias
TOOD
because I always typo it that way 😅
➕ 2
t

tddmonkey

03/26/2021, 3:03 PM
if you’re using IDEA you can just setup a template?
👍 1
l

louiscad

03/26/2021, 3:04 PM
Nowadays I'm sticking to defaults as much as possible because it's a hurdle to sync settings between multiple IDEA and Android Studio installations.
➕ 3
@Zach Klippenstein (he/him) [MOD] Now thinking about making an IDEA plugin for us in these moments when our fingers type
async
and don't
await
each other.
😒uspend: 2
s

Shawn

03/26/2021, 4:00 PM
have you tried getting bigger hands? 😛
l

louiscad

03/26/2021, 4:04 PM
@Shawn I can litteraly press both
tab
and
enter
with one hand, so it's not so much a hardware problem 😉
s

Shawn

03/26/2021, 5:11 PM
¯\_(ツ)_/¯ I feel like you gotta be real darn lazy to have a problem with hitting shift+9 if you can easily reach both keys
l

louiscad

03/26/2021, 5:13 PM
Honestly, it feels more like you don't share the problem, and didn't try to understand it before commenting 😛
I didn't say I can easily press both tab and space with one hand. It's insanely hard actually, I can stretch up to 26cm, and it hurts on the long run.
The thing is when you type a todo call, you don't want to deal with the syntax, your mind is focused on the bigger picture or other details, so requiring effort to type
TODO()
properly so the code is not all red is counter-productive.
f

Fleshgrinder

03/27/2021, 8:31 AM
It's autocompleted, no? Or is IntelliJ to slow? That said, I recommend to learn typing with the 10 finger system (do you call it like that in English too) then you press shift with the left pinky and hit the parens keys with your right hand. No more stretching and your typing speed can become really, really fast if you master it. Adding a great mechanical keyboard with keys that fit your style can give you another boost plus learning shortcuts so you never need the mouse.
t

tddmonkey

03/27/2021, 12:29 PM
I’m struggling to see the problem too. I know we’re all different, but my need to type parens outweighs my need to type TODO() by a huge margin
m

Marc Knaup

03/29/2021, 12:55 PM
On that note I’d also add
FIXME
. The IDE supports both. And for me
FIXME
is urgent while
TODO
is not.
l

louiscad

03/29/2021, 12:58 PM
For me, uncommented `TODO`s are urgent, while the commented ones last until the project dies (kidding, some die before the project 😄)
m

Marc Knaup

03/29/2021, 12:58 PM
That’s difficult to search for though.
l

louiscad

03/29/2021, 12:59 PM
Not really, I never commit
TODO()
calls beyond WIP branches, plus you can use find usages.
m

Marc Knaup

03/29/2021, 12:59 PM
Find usages requires IDE. And in projects that span a long time FIXMEs will be everywhere for quite a while 😅
l

louiscad

03/29/2021, 1:00 PM
For the ones in code, you can do a Find in Path (ctrl/cmd + shift + F) and type
//TODO
in it, it will find all the ones in EOL (end of line) comment.
m

Marc Knaup

03/29/2021, 1:02 PM
It’s not really clear to people reading the code that there are two different meanings of
TODO
, is it? Also, you can only use
TODO()
if actual code is involved replaced. You cannot just add a note
// FIXME There's an occasional race condition.
l

louiscad

03/29/2021, 1:03 PM
TODO()
in code will crash when reached, plus all the code after is marked as unreachable, I think that's good enough. If people cannot understand the difference, I'd question giving them the power to do whatever on your codebase.
m

Marc Knaup

03/29/2021, 1:04 PM
I don’t want the code to crash just because there is something to potentially be fixed in a few months…
l

louiscad

03/29/2021, 1:04 PM
BTW, the "Find in Path" option has filters to exclude comments 😉
m

Marc Knaup

03/29/2021, 1:04 PM
Again, relies on IDE. Cannot do so on GitHub for example.
l

louiscad

03/29/2021, 1:04 PM
Yeah, then just use the comments
m

Marc Knaup

03/29/2021, 1:05 PM
Yeah, then just use the comments
But then I do need a FIXME instead of TODO?
l

louiscad

03/29/2021, 1:05 PM
I never said you'd
m

Marc Knaup

03/29/2021, 1:05 PM
How else would I know the difference between “must be fixed for production” and “improve this some day”.
l

louiscad

03/29/2021, 1:06 PM
GitHub cannot search ignoring comments, well, that's sad, but I won't shape my codebase based on GitHub limitations 😄
m

Marc Knaup

03/29/2021, 1:06 PM
You don’t have to, it’s just two simple words. Lots of clarity and ease of use just by using them 🤔
l

louiscad

03/29/2021, 1:08 PM
There are many ways, if your is using TODO or FIXME, or suffixing TODO with a marker keyword like
//TODO (DONT DEPLOY)
, then great 😉
For now, there's no semantics/metadata for TODO and FIXME besides non structurally enforced plain text.
m

Marc Knaup

03/29/2021, 1:10 PM
True. I just find
TODO
quite weak for something that’s completely missing.
l

louiscad

03/29/2021, 1:15 PM
You can make your own TODO/FIXME/Whatever library I guess, then you'd ask for a Kotlin feature that allows to mark some function calls as TODOs 😄
m

Marc Knaup

03/29/2021, 1:16 PM
Calls?
l

louiscad

03/29/2021, 1:16 PM
Kinda like
@RequiresOptIn
Yep, like mark calls to
YourSuperToDo(…)
,
FixMeBeforeProdDeploy()
, etc.
BTW, you can already use annotations, and have a compiler plugin or an annotation processor that will fail the release/prod build if any is used 😉
m

Marc Knaup

03/29/2021, 1:17 PM
Ah, you mean instead of having a magic
fun TODO()
in Kotlin it would just be a regular function (or
val
) with a special annotation?
l

louiscad

03/29/2021, 1:18 PM
Yep, something like that. Similar to
@DslMarker
. Example name:
@TodoMarker
m

Marc Knaup

03/29/2021, 1:19 PM
That would also work, yes. Although more complex implementation-wise.
l

louiscad

03/29/2021, 1:19 PM
I think for your use case, custom annotations + a compiler plugin or processor (using ksp) would work best since you don't want to crash the code but fail the production builds.
m

Marc Knaup

03/29/2021, 1:20 PM
Well there are no production builds though
The test system simply gets promoted to production
l

louiscad

03/29/2021, 1:21 PM
If it's dynamic, it's tougher then
m

Marc Knaup

03/29/2021, 1:21 PM
But it would help nonetheless
Interesting hacks how the IDE finds `TODO`s: https://github.com/JetBrains/kotlin/commit/ded5bfb841ed388c1d3f0740de71a22d9ca071ab (may be outdated though)
l

louiscad

03/29/2021, 1:23 PM
You could have it (ksp, or compiler plugin) run on the system that checks if a test build can be promoted to prod
f

Fleshgrinder

03/30/2021, 6:26 AM
Why not simply collect them all with Gradle, a test, ... I don't see why it needs to be part of the language or something complex in general. It's easy to find comments starting with keywords, especially with Gradle which you can make cached, incremental, and parallel with ease. Then you can do whatever. Post it to Slack, GitHub Wiki, ...
g

gildor

04/09/2021, 5:35 AM
For me it’s enought to type “TO” + Tab to write
TODO()
, it always top suggestion if you use capital letters
l

louiscad

04/09/2021, 8:10 AM
Yeah, autocomplete is blazing fast for Kotlin code, especially when you have dozens of modules, for sure. 😅
g

gildor

04/09/2021, 8:14 AM
Well, any of proposed solutions would help with this case in this case
I’ve checked, it’s actually fast for me, at least for todo, less than a second in this case I have 250 modules
l

louiscad

04/09/2021, 8:19 AM
I have less than 100 modules, but about 400 Chrome tabs (so far)
Did
TO
+ hit the tab key quickly. Result:
TO
It's unreliable, unless I force myself to type slowly 😞
g

gildor

04/09/2021, 8:28 AM
yes, you have to wait until dialog is appeared
View count: 3