Draft:Cangjie (programming language)
Review waiting, please be patient.
This may take 8 weeks or more, since drafts are reviewed in no specific order. There are 1,762 pending submissions waiting for review.
Where to get help
How to improve a draft
You can also browse Wikipedia:Featured articles and Wikipedia:Good articles to find examples of Wikipedia's best writing on topics similar to your proposed article. Improving your odds of a speedy review To improve your odds of a faster review, tag your draft with relevant WikiProject tags using the button below. This will let reviewers know a new draft has been submitted in their area of interest. For instance, if you wrote about a female astronomer, you would want to add the Biography, Astronomy, and Women scientists tags. Editor resources
Reviewer tools
|
The following Wikipedia contributor may be personally or professionally connected to the subject of this page. Relevant policies and guidelines may include conflict of interest, autobiography, and neutral point of view. |
A major contributor to this article appears to have a close connection with its subject. (July 2024) |
Paradigm | Multi-paradigm: functional, generic, imperative, declarative, object-oriented |
---|---|
Developer | Huawei |
First appeared | June 21, 2024 |
Preview release | 1.0 (Beta)
/ June 21, 2024 |
Typing discipline | Duck, gradual, structural, Static, strong, safe, nominative, manifest, strong, inferred |
OS | HarmonyOS, Linux, Windows, macOS |
License | Proprietary (HarmonyOS) |
Filename extensions | .cj |
Website | |
Influenced by | |
ArkTS, TypeScript, JavaScript, Swift, C#, F#, Java, C++, Go, Python |
Cangjie is a high-level, statically typed, general-purpose, multi-paradigm, compiled imperative and declarative programming language developed by Huawei which was first released on June 21, 2024, as a beta recruitment of the developer preview version of the HarmonyOS NEXT app development for HarmonyOS operating system.[1] It is also referred to as CangjieLang or CJ but its proper name is Cangjie.[2]
History
[edit]Development of Cangjie started in 2019 by chief architect of Huawei's in-house programming language by Xinyu Feng, professor at the Department of Computer Science and Technology of Nanjing University alongside Tianjin University and Beihang University in its five-year development,[3] with the eventual collaboration of many other software programmers and engineers at Huawei at that time during the development initial release of HarmonyOS that same year, after being incubated in the R&D labs.[4]
In 2020, Huawei registered “Cangjie Language” trademark, which was classified as a “scientific instrument” and “web service” intellectual property in China. At that time, there were also rumors that Huawei was developing a new independent programming language Cangjie.[5]
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 that at that time that it would introduce the self-developed programming language for HarmonyOS in the future.[6]
It has also been reported between 2021 and 2022 that Huawei's programming language originally supposed to launch in 2022 or sometime around second half of 2022 which was pushed back due to ongoing development of HarmonyOS operating system internally.[1][7][8]
On May 17, 2024, Cangjie programming language was internally added into OpenHarmony source code through its foreign function interface (FFI) mechanism.[9]
On June 17, 2024, four days before HDC 2024, Huawei renamed it's programming language lab to Cangjie programming language and announces the developer sessions of the new programming language for the event.[10]
On June 21, 2024, at HDC 2024, Cangjie developer recruitment that is running throughout June 21, 2024 until October 21, 2024, first landed for Huawei Mate60 Pro devices first with expansions of more devices going into 2025 rollout of HarmonyOS NEXT.[11] Silicon Valley-based LeetCode, ICBC bank, China Mobile, Kelan Software, became one of the first local app developer companies recruited by Huawei using the new programming language to test and showcase to other developers and industry with the release of commercial apps in the initial Chinese market launch of the new HarmonyOS Next version platform.[12]
On July 5 to July 7, 2024, ACM China Turing Conference 2024 held with the Huawei Cangjie Programming Language Forum showcasing the new in-house domestic programming language across universities in China for Cangjie development integrated into academia.[13][14]
In September, LeetCode China supports Cangjie for all problems.[15]
Version history
[edit]Version history of Cangjie releases with HarmonyOS with OpenHarmony core API Level 12 SDK via DevEco Studio IDE.
Version | Release date | macOS | Windows |
---|---|---|---|
Cangjie 1.0 Beta[16] | June 21, 2024 | Yes | Yes |
Platforms
[edit]The platforms Cangjie supports are HarmonyOS, Linux, Windows and macOS for app development.
A key aspect of Cangjie design is its ability to attach with or without ArkTS code developed for HarmonyOS development. On Huawei devices running HarmonyOS, it allows Native APIs in DevEco Studio templates alternative to traditional Native APIs of C, C++ alongside ArkTS code to run within one program.[17]
Features
[edit]Unlink ArkTS, Cangjie is a general purpose programming language that is not based on any existing programming languages. The programming language employs modern programming-language theory concepts of other existing programming languages of its category that influences it such as Java with simple and advanced syntax features like Typescript-centric ArkTS language, in declarative programming development by complementing it with efficiency.[18]
Cangjie features an embedded AgentDSL programming framework, natural language & programming language organic integration. Its lightweight threads provide better concurrency and lower overhead compared to Kotlin and Java on Android, as shown in benchmark tests. [19][20]
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 Cangjie programming language or ArkTS for incremental development for developer needs.[21][22]
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.[23] 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.[24]
Basic syntax
[edit]Cangjie's "Hello, World!" program is:
main() {
println("Hello, World!")
}
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.[25]
Lambda expression can have no parameters:[1]
let f = {a: Int64, b: Int64 => a + b}
let print = { => println("Hello Cangjie")}
STD module runtime
[edit]STD module runtime, known as Std.runtime is a module runtime package for Cangjie Standard Library via Cangjie Programming Language Library API that interacts with the program's runtime environment, with varaibles of controlling, managing and monitoring the program's execution.[1]
Development tools
[edit]Compiler
[edit]With Ark Compiler, it supports a variety of dynamic and static programming languages such as JS, TS, and ArkTS as well as Cangjie. It is the compilation and runtime base that enables OpenHarmony alongside HarmonyOS based on the same platform to run on multiple device forms such as smart devices, mobile phones, PCs, tablets, TVs, automobiles, and wearables. ArkCompiler consists of two parts, compiler toolchain and runtime.[26]
IDE and editor support
[edit]Cangjie uses DevEco Studio plug-in for HarmonyOS native development as Cangjie SDK using default declarative ArkUI, also other third-party UI frameworks on HarmonyOS NEXT version and OpenHarmony SDK with future cross-platform ArkUI-X support.[27]
See also
[edit]References
[edit]- ^ a b c d 仓颉语言实战(微课视频版) [Hands on Cangjie Language (Video Course Version)]. Tsinghua University Press. 2024. ISBN 9787302616597.
- ^ Matsui, Emiko (June 21, 2024). "Huawei programming language to make official debut at HDC 2024". Huawei Central. Retrieved July 6, 2024.
- ^ 天津大学、北航深度参与华为"仓颉",推出首个基于国产编程语言的 AI 智能体编程框架"苍穹" [Tianjin University and Beihang University deeply participate in Huawei's 'Cangjie,' launching the first AI intelligent agent programming framework based on a domestic programming language, 'Cangqiong']. www.ithome.com. Retrieved July 6, 2024.
- ^ 华为下一代编程语言"仓颉"首席架构师揭晓:南京大学冯新宇教授 [The chief architect of Huawei's next-generation programming language "Cangjie" has been revealed: Professor Feng Xinyu from Nanjing University]. ITHome. Retrieved July 6, 2024.
- ^ Amit (September 25, 2021). "Huawei to launch a self-developed programming language Cangjie next year". HU. Retrieved July 6, 2024.
- ^ Benjie, Joshua (March 17, 2022). "Huawei testing own programming language registration". RPRNA. Retrieved July 6, 2024.
- ^ Li, Deng (June 16, 2022). "Huawei's programing language will launch in the second half of this year". Huawei Central. Retrieved July 6, 2024.
- ^ Walker, Elyssa (February 2, 2020). "Huawei is developing its own programming language - it will be presented in 2022". CodeBug'22. Retrieved July 6, 2024.
- ^ Benjamin (May 14, 2024). "Huawei's self developed programming language Cangjie (CJ) could be coming later this month closer than expected". HarmonyOSHub. Retrieved July 6, 2024.
- ^ Nick (June 17, 2024). "Huawei Renames Programming Language Lab to 'Cangjie Programming Language' and Announces Insights at HDC 2024". HarmonyOSHub. Retrieved July 6, 2024.
- ^ "华为开启鸿蒙 HarmonyOS NEXT 仓颉编程语言开发者预览版 Beta 招募 - IT之家". www.ithome.com. Retrieved July 6, 2024.
- ^ "华为仓颉编程语言首批合作企业亮相:中国工商银行、中国移动、科蓝软件等在列 - IT之家". www.ithome.com. Retrieved July 6, 2024.
- ^ "ACM 中国图灵大会 2024 将于 7 月 5 日举行,设华为仓颉编程语言论坛 - IT之家". www.ithome.com. Retrieved July 6, 2024.
- ^ Nick (July 7, 2024). "The Cangjie Programming Language Unveiled at ACM China Turing Conference". HarmonyOSHub. Retrieved July 7, 2024.
- ^ 编程刷题平台 LeetCode 力扣所有题目均已支持华为仓颉语言 [All problems on the programming practice platform LeetCode are now supported in Huawei's Cangjie language]. Sohu. Retrieved December 3, 2024.
- ^ Matsui, Emiko (June 21, 2024). "Huawei begins Cangjie programming language beta recruitment". Huawei Central. Retrieved July 6, 2024.
- ^ "华为仓颉编程语言首批合作企业亮相:中国工商银行、中国移动、科蓝软件等在列 - IT之家". www.ithome.com. Retrieved July 6, 2024.
- ^ "华为:仓颉编程语言自主可控,没有基于任何现有的编程语言演进 - IT之家". www.ithome.com. Retrieved July 6, 2024.
- ^ Living In Harmony (June 23, 2024). Cangjie language compared with Java and Kotlin language on app scrolling. Retrieved July 6, 2024 – via YouTube.
- ^ "华为自研仓颉编程语言官网和开发文档上线,首次融入鸿蒙生态 - IT之家". www.ithome.com. Retrieved July 6, 2024.
- ^ "Huawei has announced its own programming language Cangjie". ITC.ua. June 21, 2024. Retrieved July 6, 2024.
- ^ "华为开启鸿蒙 HarmonyOS NEXT 仓颉编程语言开发者预览版 Beta 招募 - IT之家". www.ithome.com. Retrieved July 6, 2024.
- ^ "Huawei Reveals New Programming Language, Promising Native Intelligence and Strong Security". June 23, 2024. Retrieved July 6, 2024.
- ^ Bates, Kryzt (June 21, 2024). "Huawei Releases Next-Generation Programming Language "Cangjie" After 5 Years of Research". GAMINGDEPUTY. Retrieved July 6, 2024.
- ^ 劉玥 (July 1, 2024). Cangjie Programming Quick Start 仓颉编程快速上手. ISBN 9787115624710.
- ^ "ArkCompiler Runtime". OpenAtom Gitee. Retrieved February 12, 2024.
- ^ "HarmonyOS NEXT Cangjie Language Developer Preview Beta Recruitment". Huawei Developer (HarmonyOS Developer). Huawei. Retrieved July 6, 2024.
External links
[edit]