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

    orangy

    02/27/2017, 10:56 AM
    yeah, Double and NaN, welcome to hell…
    g
    1 reply · 2 participants
  • g

    groostav

    02/27/2017, 11:02 AM
    and I'm actually kinda disappointed that
    setOf(NaN, NaN).size
    returns
    1
    u
    3 replies · 2 participants
  • j

    johannes.lagos

    02/27/2017, 11:41 AM
    Hi. How it is the proper way to init a weak reference on Kotlin?
    r
    5 replies · 2 participants
  • p

    Paul Woitaschek

    02/27/2017, 1:02 PM
    Can kotlin merge multiple exceptions in one catch?
    v
    4 replies · 2 participants
  • m

    miha-x64

    02/27/2017, 3:04 PM
    Try
    java.lang.Void.TYPE
    . To format code in Slack, wrap it into three backticks.
    a
    3 replies · 2 participants
  • d

    dblack

    02/27/2017, 5:01 PM
    Is there a way to reference the value being checked in a when statement? I could obviously store the value locally, just trying to be succinct.
    when (someCalculatedValue()) {
       1 -> doSomething(/*use value here*/)
       else -> log("nothing")
    }
    m
    7 replies · 2 participants
  • j

    jakub.dyszkiewicz

    02/27/2017, 6:53 PM
    Does anyone use Spock to test Kotlin code? If o, how do you create immutable data classes. I really would not want to pass 10 parameters via constructor 😞
    m
    e
    +1
    13 replies · 4 participants
  • i

    irus

    02/27/2017, 7:28 PM
    @voddan you mean
    kotlinx.html
    ?
    v
    2 replies · 2 participants
  • l

    luckymerlin

    02/28/2017, 6:28 AM
    seems like a workaround, but i still have to create an instance of BinarySameType if i want to pass it in as a parameter. Is there a more functional solution?
    a
    4 replies · 2 participants
  • j

    jaguililla

    02/28/2017, 8:57 PM
    I got problems with a project using 1.1 regarding a kotlin JS module
    b
    2 replies · 2 participants
  • i

    ilya.gorbunov

    03/01/2017, 3:53 AM
    @nulldev This seems to be a bug, please report it to kotl.in/issue
    1 reply · 1 participant
  • g

    groostav

    03/01/2017, 7:53 AM
    since I seem to have a couple of build experts around, have any of you guys seen this?
    Error:Kotlin: Multiple values are not allowed for plugin option org.jetbrains.kotlin.kapt:output
    Plugin "org.jetbrains.kotlin.kapt" usage:
      annotations <path>         Annotation filter regular expressions, separated by commas
      output <path>              File in which annotated declarations will be placed
      stubs <path>               Output path for stubs
      inherited <true/false>     True if collecting Kotlin class names for inherited annotations is needed
    I did use kapt but have since removed all references to it from my gradle build scripts and disabled annotation processing in intelliJ, yet when I do a
    build
    ->
    rebuild
    in intelliJ, it still blows up with this error message 😞
    1 reply · 1 participant
  • n

    nekoinemo

    03/01/2017, 10:22 AM
    is there a way to check that KClass is an enum directly (not calling .java.isEnum)?
    u
    h
    2 replies · 3 participants
  • p

    pawegio

    03/01/2017, 12:20 PM
    @voddan https://bintray.com/kotlin/notifications
    v
    1 reply · 2 participants
  • o

    orangy

    03/01/2017, 1:28 PM
    <!channel> 📣 📣 📣 The one year wait is over, Kotlin 1.1 with coroutines, JS and quite a bit of small features is here! Please see details in blog post, https://blog.jetbrains.com/kotlin/2017/03/kotlin-1-1/ Those who were brave enough to try our pre-release builds – big thanks from the whole team to you! 👏 And don’t forget to update your dependencies to released build and publish your libraries to public repositories. Some people could be waiting for your library to be updated before they can jump on the release build. I would also like to take a chance of global announcement and thank every one of you for your support, community involvement, helping us shape the language and tooling around it, your support to newcomers, talks you’ve been doing, and otherwise spreading the word! We look forward to the next year of Kotlin evolution and adoption. With you!
    🇯🇵 3
    🇺🇦 4
    🇦🇷 2
    :glitch_crab: 6
    :kotlin: 109
    ⏫ 1
    ✅ 1
    🇷🇺 1
    💪 24
    🇿🇦 1
    🇫🇷 2
    🍴 2
    🚀 9
    👏 58
    💥 15
    🍷 12
    🎉 193
    📣 19
    ♥️ 32
    💯 20
    :kotlin-flag: 55
    🍾 22
    🤘 66
    🍻 18
    👍 67
    :thumbsup_all: 21
    😍 30
    🇳🇬 8
    v
    2 replies · 2 participants
  • o

    orangy

    03/01/2017, 1:33 PM
    @pawel.urban yes, it does. We already doing it at JetBrains.
    👍 2
    💯 4
    😱 16
    💃 2
    m
    8 replies · 2 participants
  • a

    andreasbackx

    03/01/2017, 1:40 PM
    I don't think I have ever seen more reactions in my life.
    😜 6
    ❤️ 5
    🐸 4
    🤘 3
    ➕ 6
    😎 7
    a
    2 replies · 2 participants
  • m

    Marc Knaup

    03/01/2017, 1:40 PM
    Is there a Gradle snapshot already which includes Kotlin 1.1 for KTS?
    👍 4
    b
    t
    3 replies · 3 participants
  • y

    yan

    03/01/2017, 2:00 PM
    @cleiter As the compiler API was changed between Kotlin 1.0 and 1.1, you need to use the compatible plugin version (1.1) when building with the new kotlinc
    c
    2 replies · 2 participants
  • s

    seb

    03/01/2017, 2:01 PM
    h/t to whoever wrote the sample of https://kotlinlang.org/docs/reference/whatsnew11.html#type-aliases
    r
    s
    8 replies · 3 participants
  • r

    roman.belov

    03/01/2017, 2:10 PM
    <!here|@here> at the moment, samples on the
    https
    version of the site are broken, please use
    http
    for now and enjoy new live examples. We will fix it shortly http://kotlinlang.org/docs/reference/whatsnew11.html
    🛠️ 3
    🙂 2
    🆒 3
    :trollface: 6
    🙃 13
    🐿 5
    👀 3
    :kotlin-flag: 6
    ✅ 2
    🐍 2
    ❤️ 2
    🖲️ 3
    :kotlin: 6
    🚚 2
    🆗 6
    🌶️ 2
    1 reply · 1 participant
  • i

    igordonxiao

    03/01/2017, 2:21 PM
    Anyone know how to translate
    kotlin.incremental=true
    in Maven?
    u
    j
    3 replies · 3 participants
  • v

    voddan

    03/01/2017, 2:39 PM
    Why can't I
    import kotlin.streams.*
    in try.kotlinlang.org?
    y
    5 replies · 2 participants
  • m

    mikehearn

    03/01/2017, 2:44 PM
    the embeddable kotlin samples widget is very nice ... is that something open source? i wonder if it's reusable for some of the code examples in my own project
    🤔 1
    v
    y
    4 replies · 3 participants
  • o

    orangy

    03/01/2017, 2:48 PM
    <!here|@here>
    kotlinx-coroutines
    library version
    0.12
    for Kotlin 1.1.0 is released. More details in #coroutines channel: https://kotlinlang.slack.com/archives/coroutines/p1488379186003994
    🍾 3
    👍 13
    ✅ 1
    d
    4 replies · 2 participants
  • v

    voddan

    03/01/2017, 2:52 PM
    Kotlin site seems to be overloaded - at least the samples stoped working 🙈
    ✅ 1
    😱 1
    ☠️ 1
    r
    d
    +1
    6 replies · 4 participants
  • a

    adibfara

    03/01/2017, 3:12 PM
    I'm wondering , how does the Kotlin co-routines actually work on an android device? I know it doesnt use threads , so what does it use? there's an example with 100 thousand co-routines being run simultaneously which is pretty cool , compared to the old threads
    m
    e
    +1
    6 replies · 4 participants
  • c

    cedric

    03/01/2017, 3:19 PM
    @ilya.chernikov I would expect that making incremental compilation possible by an external took (Gradle) was already more effort than doing it internally so I'm a bit confused
    i
    a
    7 replies · 3 participants
  • m

    mfulton26

    03/01/2017, 5:13 PM
    Is there any way to create extension functions/properties that apply to a
    typealias
    but not to the actual type?
    i
    2 replies · 2 participants
  • m

    mfulton26

    03/01/2017, 5:14 PM
    I'm not sure I'd even want it yet; I'm just trying to wrap my head around
    typealias
    usage.
    m
    2 replies · 2 participants
Powered by Linen
Title
m

mfulton26

03/01/2017, 5:14 PM
I'm not sure I'd even want it yet; I'm just trying to wrap my head around
typealias
usage.
m

mg6maciej

03/01/2017, 5:23 PM
If you have complex types and don't want to repeat yourself.
MultiMap = Map<String, List<String>>
or
Predicate<T> = (T) -> Boolean
Just using them doesn't give much, but when you have a functional type in several places and you notice you need to add param, then you have less code to change.
View count: 1