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
  • w

    wineluis

    06/10/2017, 2:45 PM
    the compile time is so bad in kotlin. 25s for measly 300 lines of code + 1 library. insane.
    j
    d
    +1
    42 replies · 4 participants
  • e

    e.lislebo

    06/11/2017, 1:15 PM
    @ilya.gorbunov that's running the code, not creating the function reference
    i
    1 reply · 2 participants
  • i

    iex

    06/11/2017, 1:21 PM
    k, thanks!
    r
    2 replies · 2 participants
  • j

    jdiaz

    06/11/2017, 8:30 PM
    @chb0kotlin Technically it is a constant but not for the compiler
    c
    2 replies · 2 participants
  • l

    liminal

    06/11/2017, 10:48 PM
    Would be great, foo bar
    r
    t
    +1
    12 replies · 4 participants
  • l

    liminal

    06/11/2017, 10:52 PM
    I have the book, will check it out too @agomez!
    r
    a
    3 replies · 3 participants
  • i

    iex

    06/12/2017, 7:49 AM
    do I have to override toString for each of the contained subclasses...?
    m
    4 replies · 2 participants
  • m

    myanmarking

    06/12/2017, 11:41 AM
    guys, how do i reverse this:
    return this.sortedWith(
                    compareBy(
                            { it.isFriendOnline },
                            { it.presenceMode },
                            { it.gameStatus },
                            { it.name }
                    )
            )
    c
    m
    +1
    6 replies · 4 participants
  • a

    amorenew

    06/12/2017, 12:41 PM
    my interface: interface UrlContentRetrieved { fun onUrlContentRetrieved(content: String) } java code: task.setListener(new UrlContentRetrieved() { @Override public void onUrlContentRetrieved(String content) { parseResults(content); } }); is converted to task.listener = UrlContentRetrieved { content -> parseResults(content) } and i got error Error:(31, 25) Interface UrlContentRetrieved does not have constructors
    r
    8 replies · 2 participants
  • m

    mugur

    06/12/2017, 1:57 PM
    Is there a way to have a static method in Kotlin?
    d
    e
    +2
    6 replies · 5 participants
  • j

    jordan_k_miles

    06/12/2017, 3:21 PM
    Hi. New to Kotlin. Looks interesting 🙂
    🙂 1
    r
    3 replies · 2 participants
  • x

    xenomachina

    06/12/2017, 4:38 PM
    Are the differences between 1.1.2-3, 1.1.2-4, and 1.1.2-5 documented somewhere? I'm seeing lots of surprising NPEs in code when running under 1.1.2-4 that I don't see with 1.1.2-3 or 1.1.2-5.
    ❓ 4
    k
    3 replies · 2 participants
  • m

    mkodekar

    06/13/2017, 6:00 AM
    And fragments are a pain, you should use screens and views
    r
    k
    37 replies · 3 participants
  • m

    mikehearn

    06/13/2017, 9:16 AM
    it seems that Kotlin/JS is getting an array literal syntax in 1.2 but Kotlin/JVM is not?
    i
    2 replies · 2 participants
  • a

    arkadiy

    06/13/2017, 10:16 AM
    Hello guys, given Java interface
    interface Foo { int bar(); }
    why do I need an explicit labeled return in Kotlin when using SAM conversion when creating a property - instance of this interface:
    val foo = Foo { return@Foo 5}
    why cannot I just write:
    val foo = Foo { return 5 }
    I know that I can just write it as
    val foo = Foo { 5 }
    , but I wonder why I need the labeled return in the second example
    r
    3 replies · 2 participants
  • m

    menegatti

    06/13/2017, 10:56 AM
    anotate the method inside a companion object with
    @JvmField
    r
    k
    +1
    8 replies · 4 participants
  • c

    czyzby

    06/13/2017, 5:04 PM
    I'm getting a
    Unresolved reference: onEach
    after updating to
    1.1.2-4
    . The code compiles and runs fine on
    1.1.2-3
    . Is that a known issue?
    i
    19 replies · 2 participants
  • v

    vpriscan

    06/13/2017, 5:31 PM
    on clean new kotlin project I get unresolved reference for kotlin.streams
    i
    2 replies · 2 participants
  • a

    amorenew

    06/13/2017, 5:59 PM
    I have questions on Kotlin Features Survey 1-Static members in Kotlin classes #17 why people doesn't want it? 2-Optional (trailing) commas #11 what is this feature? 3-Collection comprehensions #7 what is this feature?
    d
    w
    +4
    9 replies · 7 participants
  • a

    amorenew

    06/13/2017, 6:14 PM
    without @JVMStatic you have to write employee.companion.name
    e
    r
    2 replies · 3 participants
  • w

    wasyl

    06/13/2017, 6:16 PM
    I mean, I know there is interoperability, it’s just verbose sometimes. I dislike creating companion object just to declare fields that I know would be static in Java, and don’t really fit outside of the class
    r
    3 replies · 2 participants
  • j

    jw

    06/13/2017, 6:23 PM
    i can have a companion object implement an interface and interact with its instance-less methods via abstraction
    u
    2 replies · 2 participants
  • w

    wasyl

    06/13/2017, 6:27 PM
    @jw I see your point. I wonder, is there an example of how you’d go about using companion object that implements an interface that shows how it’s useful?
    k
    1 reply · 2 participants
  • v

    vaskir

    06/13/2017, 6:36 PM
    extension functions in Kotlin are the nicest I've seen
    r
    28 replies · 2 participants
  • v

    vaskir

    06/13/2017, 6:52 PM
    about the features, being an F# dev for long time, the only thing I really, really miss in Kotlin (after a couple of weeks of learning it 🙂 is pattern matching. Another (less severe one) is a lightweight syntax for unions.
    ➕ 1
    p
    r
    +2
    8 replies · 5 participants
  • k

    krtko

    06/13/2017, 7:15 PM
    Huh why are people against private member access in tests?
    p
    3 replies · 2 participants
  • k

    kevinmost

    06/13/2017, 7:29 PM
    As they pointed out, they conflated optional trailing commas and optional commas in general in the options, which means they can't read too much into those. I don't think anyone wants the latter, but I think the former would be really nice
    p
    m
    +1
    6 replies · 4 participants
  • o

    orangy

    06/13/2017, 10:32 PM
    As far as I remember, optional commas was for list of declarations, not argument lists. E.g. primary constructor params.
    👍 1
    m
    1 reply · 2 participants
  • f

    feroz_baig

    06/14/2017, 3:21 AM
    Suppose for a class ABC, what does fun ABC () mean? Constructor are defined in a different way in kotlin
    a
    r
    6 replies · 3 participants
  • o

    oblakr24

    06/14/2017, 8:29 AM
    Any way of making a Kotlin method not visible from Java?
    m
    2 replies · 2 participants
Powered by Linen
Title
o

oblakr24

06/14/2017, 8:29 AM
Any way of making a Kotlin method not visible from Java?
m

miha-x64

06/14/2017, 8:36 AM
oblakr24:
@JvmSynthetic
👍 2
o

oblakr24

06/14/2017, 8:38 AM
This looks like what I'm looking for (even though it's undocumented), thanks.
View count: 1