
Huawei’s Cangjie programming language stepped out of China’s developer ecosystem and onto the Western open-source stage at OCX 2026 in Brussels, where Huawei Edinburgh Research Centre’s Prof. Dan Ghica presented it to the Eclipse Foundation crowd. The language has been the default for HarmonyOS 5 development — the platform running on 350 million devices with 350,000 apps — and it’s been open source since July 2025. It also has native effect handlers. That last part is the reason to pay attention even if you’ll never write a line of HarmonyOS code.
What Cangjie Actually Is
Cangjie (CJ) is a statically typed, compiled, multi-paradigm language. If you’ve used Kotlin or Swift, the syntax will feel immediately familiar: explicit func keyword, var/let/const for variables, clean pattern matching, algebraic data types. It competes in the same design space as those languages rather than the C++/Rust performance systems space.
A minimal entry point looks like this:
func main() {
println("Welcome to Cangjie!")
}
var count = 0 // mutable
let name = "Cangjie" // immutable
const MAX = 100 // constant
Nothing about the basic syntax will surprise you. The interesting parts are underneath.
Effect Handlers: The Feature That Deserves More Coverage
Effect handlers generalize exceptions. Instead of throwing and catching, you perform an effect and the calling context decides how to handle it — including resuming execution mid-function after the handler runs. Cangjie bakes this in with native perform and resume keywords.
The canonical example from Prof. Ghica’s OCX talk: a logging library that doesn’t know where it’s running. On desktop, it prints to console. On mobile, it opens an alert. On a watch, it sends an email. Without effect handlers, you pass callbacks, build strategy patterns, or scatter if/else conditions. With effect handlers, the context — the handler — decides, and the library code stays clean.
Here’s a more concrete demo: a caching handler that intercepts commands, serves cached results when available, and calls through otherwise.
func withCache<Cmd, Result, Return>(fn: () -> Return): Return
where Cmd <: Hashable & Equatable<Cmd> & Command<r> {
let cache = HashMap<Cmd, Result>()
try {
fn()
} handle (cmd: Cmd, next: Resumption<r>) {
let result = match (cache.get(cmd)) {
case None =>
let result = perform cmd
cache.put(cmd, result)
result
case Some(cached) => cached
}
resume next with result
}
}
The Resumption type captures the rest of the computation. The handler can resume it, reject it, run it twice, or transform the result. This is more powerful than exceptions and more composable than callbacks.
To put it in context: effect handlers have been a PL research fixture for a decade. Koka (Microsoft Research) and Eff are research languages built around them. OCaml 5 is the only widely-used runtime that ships native effect handlers. Cangjie is the first mainstream application language — one designed for production apps at scale — to include them as a first-class feature. That’s significant regardless of which platform you target.
Worth noting: effect handlers are still labeled experimental within Cangjie’s current release. Third-party frameworks already use them, but the native integration is ongoing. The feature exists, but don’t bet a production deadline on it yet.
The Scale Argument
It’s easy to dismiss Cangjie as a regional ecosystem play. That dismissal is understandable but increasingly hard to defend. As of March 2026, HarmonyOS hosts 350,000 applications. Meituan — China’s dominant food delivery and lifestyle platform — built its rider app in Cangjie. JD.com, China’s second-largest e-commerce platform, adopted it. This isn’t proof-of-concept territory. These are apps that handle millions of daily active users.
For developers building products for the Chinese market, ignoring Cangjie is no longer a defensible position. For everyone else, the practical value right now is in understanding the language design rather than deploying it.
The Honest Limitations
Cangjie is Huawei’s language and HarmonyOS is its primary home. Future HarmonyOS features will be Cangjie-first. The language supports Android and iOS compilation, and the documentation is in English, but the ecosystem gravity is toward HarmonyOS. Western enterprise adoption also carries geopolitical friction that isn’t going away.
The effect handlers — the most technically interesting feature — are still experimental. Competing against Kotlin for JVM/Android development or Swift for Apple platforms, Cangjie has ground to make up.
What to Do Today
If you want to understand what native effect handlers look like in a production-targeted language, the official documentation has English-language coverage of the effect system. The InfoQ writeup from May 2026 is the most detailed Western-language technical overview available. Prof. Ghica’s OCX 2026 talk on YouTube covers the effect handler motivation in depth.
If you’re building for HarmonyOS or evaluating the Chinese market, Cangjie is the language. If you’re not, it’s still worth an hour to understand why a production language shipping to 350 million devices chose to include effect handlers — and what that signals for where application language design is heading.













