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

    Bernhard

    08/10/2018, 7:45 AM
    aren't extension functions a forward compatibility hazard? e.g. you add a function to a class and the lib adds the same method with a different behavior later on. Now your code breaks
    a
    e
    +2
    • 5
    • 13
  • n

    nikolay

    08/10/2018, 8:57 AM
    you could try - https://www.udemy.com/hello-kotlin/?couponCode=FREEFORFB&siteID=i.IXi5qsT7c-PSoYxmo7LKAqy9J7i2ZM8w&LSNPUBID=i*IXi5qsT7c - for free today
    👍 2
    m
    • 2
    • 2
  • u

    Uzi Landsmann

    08/10/2018, 9:21 AM
    @Amir you can also run step by step exercises in the Kotlin track of https://exercism.io/
    👍 1
    m
    • 2
    • 2
  • b

    BMG

    08/10/2018, 11:12 AM
    Is there any channel for #buck to discuss following things? There are companies adopting okbuck in their android build system https://stackshare.io/stackups/buck-vs-gradle. 1) Moving from Gradle to OkBuck and reasons for it. 2) General discussion around Buck build tool. (Rule based in Buck vs Task based in Gradle) 3) Okbuck with Kotlin projects given it is now 100% kotlin ready (KAPT works!)
    g
    n
    • 3
    • 6
  • p

    Paul Woitaschek

    08/10/2018, 1:06 PM
    What's the best practice? When do you create classes and when do you use top level functions?
    c
    r
    r
    • 4
    • 3
  • t

    twisterrob

    08/11/2018, 9:35 AM
    Found an interesting (to me that is) trivia:
    fun main(vararg args: String) {
    	fun toCall(arg: String) = println("fun: $arg")
    	val toCall = fun (arg: String) = println("val: $arg")
    	toCall("hello")
    }
    What happens? (spoilers in thread) 1: outputs "fun: hello" 2: outputs "val: hello" 3. fails to compile
    k
    l
    • 3
    • 18
  • k

    kotlin_questions

    08/11/2018, 3:07 PM
    Hi, i have a programming design question, where could i ask this?
    s
    • 2
    • 3
  • s

    supaham

    08/11/2018, 6:49 PM
    Any Gradle DSL users around able to help me in #gradle?
    k
    • 2
    • 1
  • s

    Slackbot

    08/13/2018, 6:10 AM
    This message was deleted.
    ⛔ 4
    k
    y
    d
    • 4
    • 3
  • n

    nickk

    08/13/2018, 10:02 AM
    m
    l
    l
    • 4
    • 11
  • d

    Denis A

    08/13/2018, 10:49 AM
    Hi to all! How I can shadow unused function argument?
    g
    k
    • 3
    • 23
  • n

    nickk

    08/13/2018, 2:15 PM
    When the
    photo
    property is null, hasPhoto() seems to return true and control goes to the next statement (Kotlin 1.2.60)
    c
    d
    +2
    • 5
    • 9
  • d

    diesieben07

    08/13/2018, 2:36 PM
    Is anyone generating Kotlin code using something other than kapt? kapt is causing problems for me, because it does not work with IntelliJ's build system. And choosing "Delegate run actions to Gradle" does not work either, because it fails to properly rebuild all projects, so I am getting NoSuchMethodError, etc. And on top of all that, it is Java-only, meaning I am blocking myself from ging multiplatform in the future. My main question is: Is there some way to consume the Kotlin sources that are being compiled other than writing my own parser?
    v
    g
    +2
    • 5
    • 39
  • n

    Nav Singh

    08/14/2018, 1:17 AM
    Hi I have little question about elvis operator list.forEach { n:Int?->n?: print("No number is available") } I want to pass print statement on left hand side any suggestion or solution appreciated
    t
    • 2
    • 3
  • c

    Can Orhan

    08/14/2018, 12:26 PM
    Does Kotlin have primitive types? 😕
    g
    • 2
    • 2
  • n

    nickk

    08/14/2018, 12:28 PM
    Thank you.
    👍 1
    p
    g
    • 3
    • 4
  • r

    rakeeb

    08/14/2018, 3:46 PM
    woah that's great news! but should there be anything to stop me from using parcelize from production code now? I've used it in some of my pet projects, I have not gotten any issues from it.
    a
    • 2
    • 1
  • j

    jw

    08/14/2018, 3:48 PM
    we don't like their UX or implementation
    a
    • 2
    • 2
  • t

    tschuchort

    08/14/2018, 4:36 PM
    A question regarding constructors: consider the following class hierarchy
    class Base(private val x: X) {
        val a: Int = throw IllegalStateException(
            "something went wrong with $this") // calls Derived::toString
    }
    
    class Derived(private val x: X) : Base(x) {
        override fun toString() = x.toString() //NullPtrException: x is null
    }
    
    val d = Derived(X())
    How can it be that there is a NullPtrException in
    Derived::toString
    when it's called by
    Base::<init>
    initializing
    Base::a
    ? is
    Derived::x
    not set before giving it to the constructor of
    Base
    ?
    a
    m
    • 3
    • 4
  • t

    twisterrob

    08/14/2018, 7:58 PM
    what's the syntax for checking type and then using typed object? kind of like a
    .let<Type> { }
    a
    d
    t
    • 4
    • 16
  • k

    karelpeeters

    08/14/2018, 9:56 PM
    Do you have a JVM module that depends on a JS one? That's not supposed to be possible, right?
    c
    n
    • 3
    • 9
  • a

    Albert

    08/15/2018, 8:07 AM
    If I have some remarks about the documentation, where can I report this?
    g
    • 2
    • 3
  • k

    kotlin_questions

    08/15/2018, 8:24 AM
    I thought I should abstract away the storage implementation and create an interface, so that later i can perhaps switch from a dropbox backend to a database backend or a memory backend for tests
    g
    • 2
    • 1
  • k

    kotlin_questions

    08/15/2018, 8:26 AM
    Is that not what coding is about?
    g
    • 2
    • 3
  • k

    kotlin_questions

    08/15/2018, 8:26 AM
    I would assume that this is what general is about, and then you can join a specific channel to get more specific help
    g
    • 2
    • 7
  • k

    kotlin_questions

    08/15/2018, 8:27 AM
    Spam? Wow.. that is how you treat people.. seriously
    g
    • 2
    • 1
  • k

    kotlin_questions

    08/15/2018, 8:32 AM
    You didnt even let me ask the full question, you stopped and said i was spamming instead
    g
    • 2
    • 5
  • d

    dsavvinov

    08/15/2018, 8:38 AM
    Once again, this is a general channel of Kotlin slack, which means that questions should be about Kotlin. Maybe it's my fault, but I don't see how your question is related to Kotlin language. You're surely welcome to correct me, if I was wrong (and then maybe we'll suggest you a more suitable channel, where you can get a better expertise) Now, may I ask everyone to kindly move this discussion to :thread-please: under this message, so that we'd stop flooding #general-channel.
    • 1
    • 1
  • k

    kotlin_questions

    08/15/2018, 8:39 AM
    Why are you so worried about "flooding" the channel? What is going to happen? its general
    k
    g
    +8
    • 11
    • 45
  • s

    Slackbot

    08/15/2018, 11:31 PM
    This message was deleted.
    🚓 3
    s
    i
    p
    • 4
    • 5
Powered by Linen
Title
s

Slackbot

08/15/2018, 11:31 PM
This message was deleted.
🚓 3
s

Shawn

08/15/2018, 11:33 PM
do you have the correct slack
i

Ian

08/15/2018, 11:35 PM
kotlin?
s

Shawn

08/15/2018, 11:36 PM
Yep, your message was incomplete for a while there, seemed like it was meant for a different location
p

Pavlo Liapota

08/16/2018, 7:54 AM
@Ian Do you want to know who you can meet with in Tallinn to discuss AI on Kotlin?
i

Ian

08/16/2018, 12:46 PM
@Pavlo Liapota Was hoping to if there are any Kotliners there
View count: 2