华为公布《鸿蒙编程语言白皮书》V1.0 版:解读适用场景
Sou Hu Cai Jing·2025-06-22 20:09

Core Viewpoint - Huawei has launched the V1.0 version of the "Harmony Programming Language White Paper" on its developer website, detailing the overall framework, applicable scenarios, evolution strategy, and future vision of HarmonyOS [1]. Group 1: Overall Framework - HarmonyOS supports three programming languages: ArkTS, Cangjie, and C/C++. ArkTS is a dynamic type programming language that is easy to learn and use, suitable for efficient development scenarios. Cangjie is a static type programming language with high performance and strong security, ideal for scenarios requiring high performance and security. C/C++ is used for high-performance computing and hardware acceleration, and can be encapsulated as ArkTS and Cangjie extension modules through cross-language interoperability [4]. Group 2: Interoperability - The interoperability of the respective languages is introduced, where ArkTS and C/C++ achieve interoperability through Node-API. Cangjie and C language can call functions and convert data across languages, while Cangjie and ArkTS use interoperability libraries for data conversion and function calls [6]. Group 3: Applicable Scenarios - ArkTS is compatible with TS efficient syntax, providing a rich standard library and concurrency capabilities, supporting declarative UI development, and inheriting the TS/JS language ecosystem. It supports mixed execution modes and optimizes module loading mechanisms, offering an efficient concurrent programming model while introducing type system features and additional security mechanisms in the compilation toolchain and runtime. Cangjie, based on static typing and static compilation optimization technology, ensures program safety through static type systems and automatic memory management. It supports static compilation to machine code for different OS platforms, enabling cross-OS code sharing and provides various obfuscation techniques for asset protection [6]. Group 4: Evolution Strategy - Huawei plans to further define and refine the programming language specifications, provide compiler implementations based on these specifications, introduce type information to optimize runtime performance, and deepen the integration with AI technology to promote the application of these languages in more fields [6].