Huawei has introduced a new programming language called Cangjie at the HDC 2024 developer conference. This language aims to serve as a next-generation solution for all-scenario intelligence applications.
Huawei claims that Cangjie brings “native intelligence, natural all-scenario, high performance, and strong security.” It is designed to integrate seamlessly with the Huawei HarmonyOS ecosystem, offering a user-friendly development experience.
Key Features of Cangjie
Native Intelligence: Cangjie includes a built-in AgentDSL framework that merges natural language with programming language. This facilitates multi-agent collaboration and simplifies symbolic expressions.
Full-Scene Capabilities: The language is intended to be lightweight and scalable, featuring a modular design adaptable to various scenarios. It also supports domain-oriented development.
High Performance: Cangjie introduces a new garbage collection system for smoother application threads and quicker response times. Additionally, lightweight threads are intended to enhance concurrent performance.
Strong Security: The language has security features embedded in its design to help developers avoid security vulnerabilities.
Multi-Paradigm Support
Cangjie is a multi-paradigm language, supporting functional, imperative, and object-oriented programming styles. It includes features like type inference, generics, and pattern matching to streamline the development process.
For those concerned with safety, Cangjie offers a static-type system and automatic memory management to ensure program stability. It also includes runtime checks for error detection and cross-language interoperability security.
Concurrency and Performance
In terms of concurrency, Cangjie employs lightweight user-mode threads and concurrent object libraries, simplifying development and optimizing resource usage.
Performance is a key focus of Cangjie. The compiler and runtime are optimized for efficiency, featuring high-level and back-end compilation optimizations, as well as runtime optimizations.
A lightweight runtime design further enhances performance and resource efficiency. Additionally, Cangjie provides a comprehensive development toolchain, which includes debugging, static checking, performance analysis, and testing frameworks.
The Huawei Hongmeng HarmonyOS NEXT Cangjie language developer preview is now open for developers to sign up and explore.