AI is Reshaping Software Engineering, Calling for a New Generation of Programming Languages
Artificial intelligence is profoundly changing how software is produced, with everything from development tools to engineering pipelines undergoing an AI-native reconstruction. Against this backdrop, programming languages, the foundation of software development, are also facing new scrutiny. Although Rust has been hailed by OpenAI co-founder Greg Brockman as the “perfect language for agents” for its memory safety and high performance, and has been adopted by well-known projects like Bun, it was not created for generative AI.
As OpenAI founding member Andrej Karpathy has pointed out, Large Language Models (LLMs) excel at code “translation,” drastically altering the cost structure of software migration, but existing languages themselves are far from optimal for LLMs. This raises a core question: Do we need a new language designed from the ground up for collaboration with AI agents, rapid feedback, and a closed engineering loop?

Academic Validation: AI-Friendly Design is More Than a Marketing Buzzword
An emerging language, MoonBit, has entered the industry’s field of view, and its AI-friendliness has been validated in recent academic research. A paper accepted by the top-tier software engineering journal IEEE Transactions on Software Engineering, titled “No Resource, No Benchmarks, No Problem? Evaluating and Improving LLMs for Code Generation in No-Resource Languages,” delved into this topic.
The study evaluated MoonBit alongside another new language, Gleam, as “no-resource programming languages” (i.e., languages the model has rarely seen during its pre-training phase). The research found that although MoonBit’s public code repository on GitHub was much smaller than Gleam’s before March 2024, large language models demonstrated higher learning efficiency when processing MoonBit. Specifically, on the more challenging McEval-Hard test set, after continued pre-training with the Qwen 2.5 Coder 32B model, MoonBit’s pass@1 (the probability of generating correct code in a single attempt) reached 25.86%, compared to Gleam’s 12.47%. After further optimization through instruction migration, this metric on MoonBit improved to 32.60%, while Gleam’s reached 26.08%.
This result clearly indicates that a language’s intrinsic design significantly impacts the efficiency and quality of AI-generated code. MoonBit’s concise and consistent syntax, along with clear feedback from its toolchain, allowed it to achieve more significant performance gains than Gleam in scenarios like few-shot learning and Retrieval-Augmented Generation (RAG), proving that “AI-friendly” is a measurable engineering characteristic.
The Language is the Toolchain: An Integrated Development and Verification Pipeline
MoonBit’s core innovation lies in its “language is the toolchain” design philosophy. It is not just an isolated language syntax but a complete software production line that integrates a compiler, build system, package manager, testing framework, and AI assistant. This is designed to optimize the “generate-compile-diagnose-fix-test” loop in AI-assisted programming.
Built-in Formal Verification
MoonBit natively integrates formal verification capabilities into its toolchain, a key feature that distinguishes it from mainstream languages. Developers can directly use contracts similar to Hoare triples for property specification and verification within their production code, without needing to switch to a dedicated proof language. This design greatly enhances the “checkability” of AI-generated code.
Take the classic binary search example, where subtle errors like integer overflow have plagued many systems, including the Java standard library. In MoonBit, a developer or an AI can add preconditions, postconditions, and loop invariants to a function, and the toolchain automatically verifies whether these constraints are met. This allows AI to not only generate functional code but also to generate a “proof of correctness” that can be rigorously checked with mathematical logic, eliminating certain types of logical errors at the source.
A Rapidly Growing Ecosystem
This integrated toolchain is fostering a rapidly growing ecosystem. To date, the number of libraries on Mooncakes, MoonBit’s package management website, has surpassed 10,000, with a cumulative download count of over 4 million. The community has already produced diverse projects such as Crater (a browser engine component), a Wasm Component case from Golem Cloud, MoonXi-net (a deep learning framework), and Choir (a multi-agent orchestration tool), covering a wide range of scenarios from cloud to edge and from infrastructure to upper-level applications.
Empowering Agents: Cross-Platform Sandboxing with Wasm
For the currently trending field of AI Agents, MoonBit offers an ideal solution for implementing and distributing “Skills.” Its core is the use of WebAssembly (Wasm) technology.
Portable and Isolated Agent Skills
Developers can write business logic using MoonBit and compile it into platform-agnostic, compact Wasm bytecode. Through the Mooncakes package manager, these Wasm modules can be distributed as standardized “Skills.” An Agent or end-user can invoke them with a single command, without needing to configure complex Python or Node.js dependency environments. The sandboxing feature of Wasm naturally provides isolation, ensuring the safety of Agents executing third-party code.
Auditable Permission Policies
Furthermore, MoonBit allows a policy file to be attached to each skill package, explicitly declaring the system resources it requires, such as environment variables, file access permissions, and allowed network endpoints. For example, a tool named hn-brief designed to scrape Hacker News and use an LLM for summarization can have its policy file precisely restrict it to accessing only Hacker News and the API addresses of a specific LLM provider. This “default-deny, explicit-allow” model transforms the program’s external dependencies into a readable and auditable manifest, greatly enhancing the controllability and security of Agent code execution.
Late-Mover Advantage and Future Outlook
In the era of traditional software, promoting a new language faced enormous barriers from existing ecosystems and developer migration costs. However, in the AI era, this situation is changing. AI’s ability to code and migrate is shifting the focus of competition from the size of the existing ecosystem back to the design merits of the language and toolchain themselves.
MoonBit’s late-mover advantage is that it has no historical baggage, allowing it to be designed from day one around AI-assisted development, formal verification, and cross-platform deployment. It attempts to answer a fundamental question: When code is produced collaboratively by humans and AI, how should a programming language design its syntax, tools, verification system, and distribution paths?
Of course, the ultimate success of a language still depends on validation in industrial-grade projects, the maturity of its ecosystem, and the long-term vitality of its community. But MoonBit’s practice has already shown that through AI-friendly design, a new language can significantly shorten the cold-start period for its ecosystem. It’s not just “another new language” but more like a systematic answer to the future paradigm of software engineering. And this answer is being written by a team from China.