The use of class will be almost disappear and object will become a namespace of function which has context。
Context Receivers in #Kotlin will allow to compose types in top-level functions without requiring service layers, orchestration layers or DI frameworks.
While still being able to easily swap out implementations for testing, or otherwise.
Context Receivers 2024 ✌️

ALT fun interface HelloService { fun hello(): String } fun interface WorldService { fun world(): String } object MyService { context(HelloService, WorldService) fun helloWorld(): String = "${hello()}, ${world()}!" } fun test() { val fakeHello = HelloService { "Hello" } val fakeWorld = WorldService { "World!" } with(hello, world) { println(MyService.helloWorld()) // Hello, World!! } }
1
147
derek retweeted
The long awaited 1.2.0 release is finally here 🥳
Thank you everyone involved, providing feedback contributing and supporting @arrow_kt.
Check out the changelog, and blogpost for more details
The Arrow 1.2.0 release is here, featuring:
- New APIs for Typed Errors
- Improvements to Raise
- New NonEmptyCollection interface
- Arrow KotlinX Serialization module
Read about the changes & plans for 2.0 here: xebia.com/blog/a-new-module-… by @vergauwen_simon and @xebiafunctional
derek retweeted
Taichi v1.5.0 Released! See what's new📷:
- Taichi Runtime (TiRT) now supports Metal API and OpenGL ES
- Taichi AOT fully supports float16 data type
- Out of bound check is now supported on ndarrays
Upgrade now to experience the latest features!
pip install -U taichi==1.5.0
we'll see top functions everywhere.
Context receivers are a huge game changer in Kotlin — some final polishing, but they’re coming in 2.x. It’s a super powerful language feature, and it’ll make Kotlin code super clean!
#kotlinconf
50
it's looks like the Arrow lib in kotlin @vergauwen_simon
derek retweeted
We uploaded some slides about our PL course in @rescriptlang on the website bobzhang.github.io/rescript-… , #Rescript is a very elegant language to teach compiler theory and put it into practice!
It reminds me of the time when I was writing JavaScript.
context(A) fun B.f(block: C.()->Unit): C = C(this@f).apply { [email protected] { this.block() } }
Going overboard with Kotlin contexts with 3 "this" pointers in scope. ;-) An extension function with an extension function as a parameter and for good taste a context parameter as well.
1. The best practice coroutine scope combined with singleton service.
2. How to customize the dispatchers with Thread Pool for resource limit. (the executor service's default injection behavior will remove the coroutine task, fixing it costs lost time)
This quoted post is unavailable.
1
derek retweeted
Replying to @waylybaye
然后逐渐的,会倾向于用immutable的数据结构。状态会在函数调用栈间传递。无状态的函数越来越多。会把代码块作为一段逻辑来描述,然后把他们组合成一个 workflow,在需要的时候 run。
Motore's Layer looks a little like Zio Layer for service inject.
cloudwego / volo: A high-performance and strong-extensibility Rust RPC framework that helps developers build microservices. ★190 github.com/cloudwego/volo
How about Cluster manager, distribute compute?
The ZIO ecosystem is and has always been the Only holistic and realistic alternative to the Akka ecosystem in the Scala (and even JVM) world if you are a normal OOP developer. I realized this years ago when I WAS an OOP developer.
Every other claim is a partial solution at best.
1
I do think so too, but its terrible syntax is hard to swallow.
Explicit Task type is better than implicit coroutines
Replying to @GavinRayDev
2) Using extension functions and a type alias so it's not so ugly.
This way lets you define your concurrent tasks as isolated units of work like the above example, with an alternate syntax.
derek retweeted
SignalPlus team would like to express our sincerest appreciation for Our Top Investors' support. @HashKey_Capital @gbvofficial @StratifiedCap @Incuba_Alpha @tradeparadigm @snzholding @BaboonVc @DC_HashKey @LeslieisHODLing
bloomberg.com/press-releases…
derek retweeted
Are you working with @kotlin on the server, or the CLI and require graceful shutdowns?
Checkout this cool new library in the @arrow_kt organisation!
Feedback very welcome as always on here, GitHub or Slack 🙏
Introducing SuspendApp - an application builder that gives strong guarantees in terms of app. termination.
- Only base dependency is KotlinX Coroutines
- Reason about resource safety in terms of Structured Concurrency
- Leverages @kotlin MPP
47deg.com/blog/release-post-…




















