https://kotlinlang.org logo
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
benchmarks
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
confetti
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
hiring-french
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
lincheck
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
Title
c

CLOVIS

04/13/2023, 3:28 PM
Wow I'm not a fan of the "changing grain of Kotlin" This is their example of "the ideal situation that we doesn't exist in Kotlin", where Arrow 1.0 is almost character for character that, and Arrow 2.0 is even shorter to write without needing wrapper types.
It's really weird to me to do a talk on functional error management in Kotlin without even being aware of Arrow.
s

streetsofboston

04/13/2023, 3:31 PM
Hmmm... just started watching this as well. I agree with you. either { ... } or effect { ... } comprehensions with some additional .bind() calls (instead of <-) works well in Arrow.
Maybe they will still get there later in the talk 🙂
c

CLOVIS

04/13/2023, 3:33 PM
And that's in 1.0! In 2.0 you don't even need
bind
in this example, nor the wrapper return type:
context(Raise<Error>)
fun handlePost(request: HttpRequest): HttpResponse {
    val json = request.readJson()
    val command = json.toCommand()
    val resource = loadResource(request)
    val outcome = performCommand(resource, command)
    outcome.toHttpResponseFor(request)
}
s

streetsofboston

04/13/2023, 3:33 PM
Right! With context receivers, that is no longer needed... But that is still experimental (context receivers) 🙂
c

CLOVIS

04/13/2023, 3:34 PM
Sure, it's experimental, but you can't make a talk about "this is not possible in Kotlin", when 1) a major library has been doing this for years, and 2) they have an experimental version that's even better
Great, now they're complaining about the lack of typeclasses, using almost exactly the example used by the context receiver KEEP
So they do know about KEEP-87 and context receivers, but don't know about the library which is more or less their origin?
s

streetsofboston

04/13/2023, 3:51 PM
Maybe they get to Arrow later, when circling back to the 'grain' with the new 'context' receivers
Ah... hahahahaa just when I pressed the enter key 🙂
c

CLOVIS

04/13/2023, 3:51 PM
…let's see what they say.
"Trying to say we should use optional instead of nullable" → the optional documentation literally says the opposite
s

streetsofboston

04/13/2023, 3:53 PM
Patience is a virtue 🙂
c

CLOVIS

04/13/2023, 3:53 PM
Oh, so they do know everything they've said is wrong?
s

streetsofboston

04/13/2023, 3:54 PM
I don't think so... in the beginning they assumed something like Arrow didn't exist and circled back to where it does.
c

CLOVIS

04/13/2023, 3:54 PM
They did spend 10 minutes saying it's not possible, including libraries
s

streetsofboston

04/13/2023, 3:55 PM
Not sure... I thought they meant some of the constructs would go against the 'grain' of the language. But I'd need to rewind a bit for confirm this 🙂
c

CLOVIS

04/13/2023, 3:56 PM
Oh, so they're selling a book
"Everything will change, be worried, buy our book!"
After spending 30 minutes saying things that are just wrong?
e

Emil Kantis

04/14/2023, 7:27 AM
I bought the book a while back. Haven't read it yet so can't comment on the content, but Duncan's videos are actually kind of interesting and he's obviously a skilled craftsman. Unfortunately he doesn't seem very immersed in the Kotlin ecosystem. He did a video on property testing without mentioning Kotest for instance, which hurt a bit 😁
c

CLOVIS

04/14/2023, 7:39 AM
Compare to Kevlin Henrey's talk right now, which started by "I'm not a Kotlin guy" (not: "I'm going to show you what's idiomatic in Kotlin"), which has examples with pretty good Kotest usage
It's actually impressive how the "changing grain of Kotlin" talk has an opposite conclusion to almost the entire conf (on error management, on Loom vs Coroutines, on testing…)
o

Oliver Eisenbarth

04/14/2023, 3:01 PM
I've read the book and thought it was great. But I felt that "Some other result libraries would let use abuse coroutines (...) to get the same effect as the earlier early returns (...)" (p. 342) is a take on Arrow. I love Duncans videos - especially the latest with Lukas Eder of JOOQ - but I would really like to know, if he has seen the latest Arrow API and if he thinks, that this is abusing coroutines and why so.🤔 BTW didn't get to see the talk, but will do once they're uploaded.
s

streetsofboston

04/14/2023, 3:10 PM
@Oliver Eisenbarth You can find that video here:

https://www.youtube.com/watch?v=03T-ARIo0t8&amp;t=25880s

c

CLOVIS

04/14/2023, 3:16 PM
I would really like to know, if he has seen the latest Arrow API and if he thinks, that this is abusing coroutines and why so
Considering the KotlinX.Coroutines team themselves have praised Arrow for their inventive usage, I wouldn't say it's abuse
And stuff like the Resource plugin or Saga are literally the spirit of structured concurrency
s

Stylianos Gakis

04/25/2023, 7:50 PM
Just watched it myself to see if what you are saying is true. They made a comment about using option instead of nullables because... Monads. Literally not what arrow is suggesting, at least not anymore. Talking about ever increasing indent using arrow. Again, solved with
either {}
and the likes. And a comment that said "bending language features to find a way to achieve the goal" which I assume they meant what Oliver mentions above. What a weird experience to watch that talk as someone who does actually use arrow and the latest APIs. The problem is that for someone who doesn't, they may just watch this and think "oh okay, so let's not use Arrow then". That was definitely not fun to watch. I guess our best place for feedback is the kotlinconf app which let you write a comment about each talk.
c

CLOVIS

04/25/2023, 10:53 PM
They also seem to be strongly anti-coroutines, and... Well I don't think there's anything more idiomatic than coroutines, short of the standard library?