Hey, it begins to be possible to write server-side...
# server
s
Hey, it begins to be possible to write server-side applications with Kotlin/Wasm with https://github.com/kowasm/kowasm, if you want to learn more: https://twitter.com/sdeleuze/status/1639588268151910401 (the server-side stuff is towards the end but it probably helps to get some context with the first part of the presentation before). Happy to listen your feedback or questions if you have any 🧵.
👌 2
K 10
.wasm 1
K 3
c
I notice the WIT spec supports both result with a single success value and also with the success and error. It’s about time we have something like this baked into the stdlib, the current Result without the modelled error is frustrating. I end up reaching for third party libs or writing my own each time 😑
s
Search "WIT results" in the blog post, you will find we translate that to Kotlin Exception.
A better
Result
in Kotlin could sometimes be useful.
But I think we should translate WIT to idiomatic general purpose Kotlin.
For WIT option, we translate it to Kotlin nullable type.
c
Thats actually why I mentioned it, because that translation is more complex because of the decision to have Result essentially be a Try rather than an Either. More and more languages are having both Optional<T> and Result<S,E> built it in
rant aside, awesome article btw!
s
Thanks ^^