https://kotlinlang.org logo
Docs
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
announcements
  • e

    emmanuelvinas

    07/10/2017, 12:54 PM
    hi guys, i'm wondering what's the figurine in the middle is supposed to represent. do you know ? https://www.stickermule.com/marketplace/15355-kotlin-with-flags
    v
    1 reply · 2 participants
  • e

    evkaky

    07/10/2017, 1:14 PM
    guys, I need to iterate over some collection but not from first index, and I don’t want to deal with indices at all. I know, in python there is an
    enumerate(arr, fromId)
    built-in function for that purpose:
    for elem in enumerate(arr, 2): // elem = arr[2], arr[3] ... arr[n-1]
    Is there something like that in kotlin std lib?
    g
    m
    5 replies · 3 participants
  • p

    Paul Woitaschek

    07/10/2017, 1:22 PM
    How can I catch that from a java caller?
    v
    1 reply · 2 participants
  • r

    rohith

    07/10/2017, 2:54 PM
    Is it possible to map through a data class?
    m
    k
    +1
    13 replies · 4 participants
  • k

    karelpeeters

    07/10/2017, 3:17 PM
    new Task;
    , that's not really valid Java. Are you sure there's not some issue with the decompiler? Kotlin does sometimes generate bytecode that doesn't have a valid Java counterpart.
    w
    10 replies · 2 participants
  • m

    musachy

    07/10/2017, 5:32 PM
    how is property ambiguity resolved? Cant find any info on that
    k
    28 replies · 2 participants
  • j

    jlleitschuh

    07/10/2017, 6:08 PM
    Does anyone have experience with Jacoco and Kotlin? Does it work well? Is there some better tech out there for code coverage in Kotlin?
    m
    1 reply · 2 participants
  • r

    rogeralsing

    07/10/2017, 6:10 PM
    @poohbar ty, but if I base my API on that, then it will be more or less impossible to consume from Java, right?
    d
    2 replies · 2 participants
  • r

    rogeralsing

    07/10/2017, 8:36 PM
    In .NET, there is a
    TaskCompletionSource<T>
    which can be used to set results to a Task. My impression here is that
    Deferred<T>
    maps roughly to
    Task<T>
    in .NET, right? is there any way to get a Deferred that can be completed via code?
    i
    1 reply · 2 participants
  • d

    danneu

    07/10/2017, 9:14 PM
    what is
    1.1.3-2
    ? is it some sort of release candidate or an intermediate release?
    l
    2 replies · 2 participants
  • k

    kirillrakhman

    07/11/2017, 8:46 AM
    huh, I just noticed that you can pass an empty lambda
    {}
    to a function expecting
    () -> Any
    because the lambda returns
    Unit
    which is a subtype of
    Any
    . That's ... interesting
    k
    1 reply · 2 participants
  • j

    joelpedraza

    07/11/2017, 4:10 PM
    Is any way to ensure calls to fun stored as a (val) class field are inlined? For example to pass in a comparator to a heap structure.
    d
    k
    5 replies · 3 participants
  • m

    martindg

    07/11/2017, 5:58 PM
    Hi guys, anybody knows if it's possible to do streams with kotlin, mainly the parallel process? i'm trying to make a parallel processing in android app in order to solve a computation quickly?
    r
    e
    5 replies · 3 participants
  • k

    karelpeeters

    07/11/2017, 10:27 PM
    Is there a workaround for this issue?
    class MyClass {
        var a: Int
        
        init {
            computeA()
        }
    
        private fun computeA() {
            a = 5
        }
    }
    The compiler complains that I have to initialize
    a
    , apparently it can't tell
    computeA()
    does initialize it.
    a
    d
    +1
    10 replies · 4 participants
  • k

    kotlin_questions

    07/12/2017, 2:09 AM
    Can someone help me with kotlinjs?
    g
    1 reply · 2 participants
  • k

    kotlin_questions

    07/12/2017, 2:28 AM
    OMG i need to build it first
    g
    s
    23 replies · 3 participants
  • p

    pniederw

    07/12/2017, 3:00 AM
    Constantly torn between
    java.io.File
    + Kotlin extensions and
    java.nio.file.Path/Files
    without. Wish I wouldn’t need to make a choice between better API usability and better file system implementation.
    i
    5 replies · 2 participants
  • w

    w_bianrytree

    07/12/2017, 12:15 PM
    Anyone have a good kotlin code style file can share with me ? thx
    l
    y
    +1
    8 replies · 4 participants
  • p

    pawel.rybicki

    07/12/2017, 1:37 PM
    it works with
    Any
    if its not a
    List
    a
    x
    15 replies · 3 participants
  • k

    kevinherron

    07/12/2017, 4:10 PM
    how can I submit a useful bug report for Refactor > Rename on a Kotlin class locking up my IDE?
    a
    5 replies · 2 participants
  • j

    joelpedraza

    07/12/2017, 6:48 PM
    I understand the reasoning for not including checked exceptions in the lang, but when it comes to java interop I need to deal with environmental errors somehow. So far I'm using my own biased Either, whose semantics I prefer over try/catch. That said, it's entirely dependent on my disciple to check if any java function I call throws some checked exception. Have any best practices emerged? Is there any linting or equivalent that can alert me to uncaught checked exceptions?
    v
    j
    +1
    11 replies · 4 participants
  • t

    tschuchort

    07/12/2017, 7:00 PM
    in the context menu I can only mark it as plain text 😕
    j
    4 replies · 2 participants
  • o

    orangy

    07/12/2017, 8:00 PM
    Hmm, please stay on topic and within Kotlin context. 🚓
    🙊 1
    👍 1
    d
    d
    3 replies · 3 participants
  • k

    kevinherron

    07/12/2017, 8:51 PM
    did something change? this worked at one point
    d
    l
    5 replies · 3 participants
  • r

    rogeralsing

    07/13/2017, 7:28 AM
    We are porting Proto.Actor to Kotlin (http://proto.actor) https://github.com/AsynkronIT/protoactor-kotlin WiP atm, but things are looking great, especially perf using coroutines. If anyone is interested in this space, feel free to join the effort.
    o
    1 reply · 2 participants
  • e

    evanchooly

    07/13/2017, 8:11 AM
    comparison to akka?
    r
    1 reply · 2 participants
  • w

    wasyl

    07/13/2017, 9:03 AM
    Is it possible to have a property override Java interface method? As in
    String getName()
    in interface would be implemented by
    val name: String
    property. I get
    same JVM signature
    error, although this SO answer suggests that having the property
    private
    would solve the problem: https://stackoverflow.com/questions/29268526/how-to-overcome-same-jvm-signature-error-when-implementing-a-java-interface
    k
    c
    5 replies · 3 participants
  • r

    rajendhiraneasu

    07/13/2017, 10:52 AM
    is that shallow copy is possible in kotlin? how come it works with copy()? while using data class?
    k
    9 replies · 2 participants
  • b

    badlogic

    07/13/2017, 3:32 PM
    Here it is in action

    https://youtu.be/MGmdGUVWHOU▾

    e
    2 replies · 2 participants
  • m

    mkporwit

    07/14/2017, 12:12 AM
    However, when I just try and look up one key, it reverts to the deprecated implementation, even if I try and give it a hint that I expect the return to be a Long!
    i
    1 reply · 2 participants
Powered by Linen
Title
m

mkporwit

07/14/2017, 12:12 AM
However, when I just try and look up one key, it reverts to the deprecated implementation, even if I try and give it a hint that I expect the return to be a Long!
i

ilya.gorbunov

07/14/2017, 12:28 PM
Deprecation doesn't affect the overload resolution rules. The only exception is
Deprecated(HIDDEN)
which hides the deprecated member completely.
View count: 2