At the Huawei Developer Conference 2025 (HDC 2025) on June 20, 2025, Huawei officially announced the launch of the HarmonyOS 6 Developer Beta version, further enhancing the innovation in user experience and development efficiency. Gong Ti, President of Huawei's Consumer BG Software Department, delivered a speech titled "A More Efficient Harmony Development Experience" and announced that the Cangjie programming language would go open source on July 30. Cangjie first made its debut at the Huawei Developer Conference in June 2024, positioned as a next-generation programming language.
Features of the Cangjie Programming Language
As a new programming language, Cangjie has absorbed the strengths of various mainstream programming languages and developed its own unique characteristics.
Efficient Programming: For application development, programming languages should be easy to learn and use, lowering the entry barrier for developers and reducing the cognitive load during the development process. They should support various common development paradigms and programming models, enabling developers to express business logic concisely and efficiently. Cangjie is a multi-paradigm programming language that supports functional, imperative, and object-oriented paradigms, including features such as value types, classes and interfaces, generics, algebraic data types, pattern matching, and higher-order functions. Additionally, Cangjie supports type inference, reducing the burden of type annotations for developers. Through a series of concise and efficient syntaxes, it minimizes redundant code and enhances development efficiency. The language's built-in syntactic sugar and macro capabilities enable developers to quickly develop domain-specific languages (DSLs) based on Cangjie and build domain abstractions.
Safety and Reliability: As a modern programming language, Cangjie strives for security at the coding level. Through its static type system and automatic memory management, it ensures type safety and memory safety such as null safety. Meanwhile, Cangjie provides various runtime checks, including array bounds checking, type conversion checking, numerical overflow checking, and string encoding validity checking, to promptly detect errors during program execution. Furthermore, it offers additional support for cross-language interoperability security and code asset protection through code scanning tools, obfuscation tools, and sanitizers.
Effortless Concurrency: Concurrency and asynchronous programming are essential capabilities in application development, effectively improving processor utilization and ensuring program responsiveness in interactive applications. The Cangjie language implements lightweight user-mode threads and a concurrency object library, making efficient concurrency effortless. Cangjie adopts a user-mode thread model, where each Cangjie thread is an extremely lightweight execution entity with an independent execution context but shared memory. For developers, the use of user-mode threads remains consistent with that of traditional system threads, without adding extra burden. From a runtime perspective, thread management is handled by the runtime system, independent of the operating system's thread management. Therefore, operations such as thread creation, scheduling, and destruction are more efficient, with lower resource consumption compared to system threads. To avoid data races, Cangjie provides a concurrency object library where the methods of concurrency objects are thread-safe. Thus, calling these methods in a multi-threaded environment is no different from serial programming, and application logic developers do not need to worry about concurrency management. For some core libraries, Cangjie also provides lock-free or fine-grained locking algorithm implementations to further reduce thread blocking and improve concurrency.
Exceptional Performance: The Cangjie compiler and runtime optimize compilation across the entire stack, including compiler front-end optimizations based on CHIR (Cangjie HighLevel IR) (such as semantic-aware loop optimization and semantic-aware backend collaborative optimization), backend-based optimizations (such as SLP vectorization, Intrinsic optimization, InlineCache, inter-procedural pointer optimization, and Barrier optimization), and runtime-based optimizations (such as lightweight locks, distributed marking, and concurrent tracing optimization). These optimizations enable Cangjie to fully leverage processor capabilities and provide exceptional performance support for applications. Additionally, the Cangjie language adopts a native lightweight design for the runtime. Through modular and layered design of the runtime, it defines the Cangjie common object model and runtime common infrastructure components. Based on the common object model, it implements basic runtime capabilities such as memory management, stack unwinding, exception handling, and cross-language calls, significantly reducing redundant object designs across multiple capabilities and streamlining the runtime size. Meanwhile, through on-demand package loading technology, it reduces redundant package memory overhead during Cangjie application startup, resulting in lower resource consumption and better support for resource-sensitive devices.
In addition, Cangjie supports a series of toolchains for application development, including language services (highlighting, code completion), debugging (cross-language debugging, thread-level visual debugging), static checking, performance analysis, package management, documentation generation, mock tools, testing frameworks, coverage tools, fuzzing tools, and intelligent programming assistance tools, further enhancing the software development experience and efficiency.
Interpretation of the Harmony Programming Language White Paper
On June 20, 2025, Huawei released Version 1.0 of the "Harmony Programming Language White Paper." The core content of the white paper is as follows:
Harmony Programming Language Overall Framework
-
Multi-Language Ecosystem: Harmony supports three programming languages—ArkTS, Cangjie, and C/C++—which complement each other and jointly support the construction of the Harmony application ecosystem.
- ArkTS: A dynamically typed programming language based on TypeScript, characterized by its ease of learning and use, and a rich ecosystem, suitable for efficient development scenarios.
- Cangjie: A statically typed programming language with high performance, strong security, and cross-platform capabilities, suitable for scenarios with high performance and security requirements.
- C/C++: Suitable for specific scenarios such as high-performance computing and hardware acceleration, and can be encapsulated as ArkTS and Cangjie extension modules through cross-language interoperability.
Language Interoperability: ArkTS and C/C++ achieve interoperability through Node-API; Cangjie and C language achieve mutual function calls and cross-language data conversion; Cangjie and ArkTS achieve data conversion and function calls through an interoperability library.
Harmony Programming Language Application Scenarios
- Efficient Development: ArkTS is compatible with TS's efficient syntax, provides a rich set of basic libraries and concurrency capabilities, supports declarative UI development, and can inherit the TS/JS language ecosystem.
- High Performance: ArkTS's compilation runtime supports hybrid execution modes, optimizes module loading mechanisms, and provides an efficient concurrent programming model. Cangjie, based on static typing and static compilation optimization technologies, offers exceptional performance support.
- Security: ArkTS introduces features such as a type system at the language level and provides additional security mechanisms in the compilation toolchain and runtime. Cangjie ensures program security through static typing, automatic memory management, etc.
- Cross-Platform: Cangjie supports static compilation to machine code for different OS platforms, enabling cross-OS platform code sharing and supporting multiple operating system platforms.
- Technical Asset Protection: ArkTS provides source code obfuscation tools like ArkGuard. Cangjie offers various obfuscation techniques such as shape obfuscation, data obfuscation, and control flow obfuscation.
Harmony Programming Language Evolution Strategies
- ArkTS Evolution Strategy: Further define and refine the language specification, provide compiler implementations based on the language specification, and introduce type information to optimize runtime performance.
- Cangjie Evolution Strategy: Continuously improve the efficient development experience, provide high-performance and strong security capabilities, and continuously refine and explore in the areas of cross-platform and intelligence.
- Intelligent Evolution Strategy: Cangjie will build Agent DSL capabilities through metaprogramming and DSL capabilities, and in the future, will deepen integration with AI technologies to promote applications in multiple fields.
Language Evolution Strategies for the Next Year
- ArkTS: Will continue to iterate and evolve, further enriching new features such as concurrent programming, improving the type system, modernizing syntax, enhancing development efficiency, and enriching SDK functionality.
- Cangjie: Will aim to improve the developer experience, continuously build language capabilities from aspects such as language feature construction, compatibility with existing ecosystems, and improving the usability of the toolchain, including API development, development tool support, and documentation improvement.
Summary
Both ArkTS and Cangjie will serve as the main programming languages for Harmony, enjoying equal status and complementary advantages, jointly supporting the construction of the Harmony application ecosystem. ArkTS has a first-mover advantage with a rich API library, while Cangjie, though later to the market, boasts inherent high performance and security.
For more content related to Cangjie, please refer to the open-source and free tutorial "Learning Cangjie Programming Language Development with Way Lau" and "Building an Intelligent Assistant APP with HarmonyOS NEXT + AI Large Model (Cangjie Edition)."
References
- "Learning AI Large Model Development with Way Lau" Open Source and Free Tutorial: https://github.com/waylau/ai-large-model-tutorial/
- "Learning Cangjie Programming Language Development with Way Lau" Open Source and Free Tutorial: https://github.com/waylau/cangjie-programming-language-tutorial
- "Learning HarmonyOS Development with Way Lau" Open Source and Free Tutorial: https://github.com/waylau/harmonyos-tutorial
- "Practical Development of HarmonyOS Mobile Applications" (Tsinghua University Press)
- "Introduction to HarmonyOS Application Development" (Tsinghua University Press)
- "Rapid Hands-On HarmonyOS Development from Scratch - Imitating Douyin App Development (ArkTS Edition)" (https://coding.imooc.com/class/843.html)
- "Mastering HarmonyOS Application Development from Beginner to Advanced (2nd Edition)" (Peking University Press)
- "Introduction to HarmonyOS NEXT Native Application Development" (Tsinghua University Press)
- "Building an Intelligent Assistant APP with HarmonyOS NEXT + AI Large Model (Cangjie Edition)" (https://coding.imooc.com/class/927.html)
- "Harmony Programming Language White Paper" Version 1.0: https://developer.huawei.com/consumer/cn/doc/guidebook/programming-language-0000002323920052
Top comments (0)