Skip to content
Tech News
← Back to articles

Minikotlin

read original more articles
Why This Matters

Minikotlin introduces a lightweight, WASM-GC compatible Kotlin subset with comprehensive features such as classes, inheritance, null safety, generics, operator overloading, and coroutines. Its design ensures end-to-end testing and seamless integration into web assembly environments, making Kotlin more accessible for web development and cross-platform applications.

Key Takeaways

Not a token subset. These are lowered properly onto the WASM-GC type system — each one has end-to-end tests behind it.

Classes & objects object model Inheritance ( open / override ), interfaces with default methods, data class with generated equals / hashCode / copy , enum , and named, companion & anonymous object expressions.

Sealed & smart-casts control flow sealed hierarchies with exhaustive when , is checks compiled to ref.test , and flow-sensitive smart-casting that holds across branches.

Null safety types Nullable types end to end — ?. safe calls, ?: elvis and !! assertions — including nullable primitives, boxed through Any .

Generics types Type parameters on functions and classes — fun <T> id(x: T): T — lowered over a boxed Any representation.

Operators & extensions ergonomics Operator overloading ( plus , get , …) dispatched to the LHS class, extension functions in their own namespace, and custom accessors with a backing field .

Coroutines non-blocking launch , delay and coroutineScope — real suspension compiled as CPS over closures, with no Asyncify, no JSPI and no threads.