ArticleslgStudy

computer science

Cangjie (programming language)

Cangjie (programming language) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Cangjie (programming language) rather than just read about it. In short: Cangjie (Chinese: 仓颉; pinyin: cāngjié) is a high-level, statically typed, general-purpose, multi-paradigm, compiled imperative and declarative programming language developed by Huawei. It was first released on June 21, 2024, as part of developer beta recruitment, for HarmonyOS NEXT app development on the preview version of the HarmonyOS operating system.

Key takeaways

  • Cangjie (programming language) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Cangjie (programming language) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Cangjie (programming language) from memory before moving on to harder problems.

Reference excerpt

Cangjie (Chinese: 仓颉; pinyin: cāngjié) is a high-level, statically typed, general-purpose, multi-paradigm, compiled imperative and declarative programming language developed by Huawei. It was first released on June 21, 2024, as part of developer beta recruitment, for HarmonyOS NEXT app development on the preview version of the HarmonyOS operating system. It is also referred to as CangjieLang or CJ, but its proper name is Cangjie.

Etymology Cangjie is a legendary figure in Chinese folklore credited with first inventing Chinese characters. The Cangjie input method was similarly named after him. Huawei has released other products using names of Chinese mythological creatures, such as the Huawei Kirin mobile chipset, named after the qilin creature (Chinese: 麒麟; pinyin: qílín).

History Development of Cangjie was started in 2019, by Xinyu Feng, who is a professor at the Department of Computer Science and Technology of Nanjing University. He had assistance from Tianjin University and Beihang University in its initial five years of development, with the eventual collaboration of many other software programmers and engineers at Huawei, during the development of HarmonyOS's initial release and after it was incubated in the R&D labs. In 2020, Huawei registered “Cangjie Language” as a trademark. It was classified, in China, as a “scientific instrument” and “web service” intellectual property. At that time, there were also rumors that Huawei was developing a new independent programming language. During HDC 2021, in October 2021, HarmonyOS 3 Developer Preview was officially released as the OS was moving towards declarative programming software development. Huawei also announced, at that time, it would introduce its self-developed programming language for the HarmonyOS in the future. It was also reported, that between 2021 and 2022, the programming language was supposed to have actually been launched in 2022. It was supposedly pushed back due to ongoing development of the HarmonyOS operating system. On May 17, 2024, Cangjie programming language was internally added into OpenHarmony source code through its foreign function interface (FFI) mechanism. On June 17, 2024, four days before HDC 2024, Huawei renamed its programming language lab to Cangjie programming language and announced the developer sessions of the new programming language for the event. At the Huawei HDC 2024 Developer Conference, whose registration period was between June 21, 2024 to October 21, 2024, beta recruitment for HarmonyOS NEXT took place. Only Huawei Mate60 Pro devices were supported, with more devices planned for 2025. Silicon Valley-based LeetCode, ICBC bank, China Mobile, Kelan Software, were among the first local app developer companies recruited by Huawei using the new programming language. This was to test and showcase to other developers and the industry, by releasing commercial apps into the Chinese market, during the launch of the new HarmonyOS Next version platform. On July 5 to July 7, 2024, the ACM China Turing Conference 2024 was held with the Huawei Cangjie Programming Language Forum, showcasing the new domestic programming language across universities in China and integration into academia. In September 2024, the Cangjie programming language was officially launched on LeetCode. Cangjie was open-sourced on July 30, 2025.

Version history Version history of Cangjie releases with HarmonyOS with OpenHarmony core API Level 12 SDK via DevEco Studio IDE.

Platforms The platforms Cangjie supports for app development are: HarmonyOS, Linux, Windows, macOS, Android and iOS. A key aspect of Cangjie's design is its ability to attach with or without ArkTS code. On Huawei devices running HarmonyOS, it allows the native APIs in DevEco Studio templates, C, C++, and ArkTS code to run alongside each other in one program.

Features Unlike ArkTS, Cangjie is not derived from any existing programming languages. The programming language, however, employs modern programming-language theory concepts and advanced features found in other existing languages in its category, such as Java. It can be used in a multi-language hybrid development environment, with the Typescript-centric ArkTS language, to create complementary advantages for greater efficiency gains and based on different scenarios. Cangjie features an embedded AgentDSL programming framework, natural language & programming language organic integration. It is reported that applications that have already been developed on existing ArkTS do not need to be redeveloped into the Cangjie version on HarmonyOS Next version. HarmonyOS supports high-performance interoperability between the Cangjie language and the ArkTS language. In the future, developers can choose between the Cangjie programming language or ArkTS for incremental development to satisfy developer needs. Huawei also claims that the language integrates security features into its design, aiming to allow developers to focus on application functionality while, reducing potential security vulnerabilities. The language provides a static type system and automatic memory management to enhance application stability, alongside runtime error detection and cross-language security measures. Cangjie also supports various toolchains for app development, including language services such as: highlighting and association, debugging with cross-language debugging and thread-level visual debugging, static checking, performance analysis, package management, document generation, Mock tools, testing frameworks, coverage tools, Fuzz tools, and intelligent assisted programming tools.

Basic syntax Cangjie's "Hello, World!" program is:

Immutable variables are declared with the let keyword and mutable ones with the var keyword. Values must be initialized before they are read. Values may infer their type based on the type of the provided initial value. If the initial value is set after the value's declaration, a type must be declared explicitly.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Cangjie (programming language)

Start with the simplest possible case. Write down what Cangjie (programming language) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Cangjie (programming language) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Cangjie (programming language) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Cangjie (programming language)

In research
Cangjie (programming language) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Cangjie (programming language) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Cangjie (programming language) is common in secondary-school and first-year university syllabi. It links to neighbouring topics 2024 software, Cross-platform software, Huawei products, so understanding it makes those chapters shorter.
In everyday life
Look for Cangjie (programming language) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Cangjie (programming language)” →

How to study Cangjie (programming language) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Cangjie (programming language) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Cangjie (programming language) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Cangjie (programming language) in simple terms?

Cangjie (Chinese: 仓颉; pinyin: cāngjié) is a high-level, statically typed, general-purpose, multi-paradigm, compiled imperative and declarative programming language developed by Huawei. It was first released on June 21, 2024, as part of developer beta recruitment, for HarmonyOS NEXT app development…

Why does Cangjie (programming language) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Cangjie (programming language)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Cangjie (programming language).

Tags

  • 2024 software
  • Cross-platform software
  • Huawei products
  • Object-based programming languages
  • Scripting languages
  • Source-to-source compilers
  • Statically typed programming languages

Keep exploring