Modular发布AI编程语言Mojo 1.0,统一语法表达、新增lambda语法、强化引用失效诊断、并预告年内开源编译器。Mojo已支持CPU/GPU/加速器开发。
Modular has officially released Mojo 1.0, further refining the syntax and type system, and adding partial diagnostics for the "dangling reference" problem.

Specifically, Mojo 1.0 unifies functionality that previously had multiple expression forms (including variable declarations, closures, and pointer types), while also introducing Python-like lambda anonymous function syntax, allowing developers to create short inline closures directly in code.
Additionally, Mojo 1.0 includes diagnostics for the "dangling reference" problem. As an example, when a program adds new elements to a List, references pointing to data inside the List may become invalid due to memory reallocation. If the code continues using such a reference, it can lead to hard-to-detect errors. Mojo can now identify these "dangling reference" situations and proactively warn developers to make corrections.
Modular also revealed that over the past few years, Mojo has been in a rapid development phase with constant adjustments to syntax, the type system, and the standard library, significantly increasing development and maintenance costs for many projects. Therefore, the focus of Mojo 1.0 is to establish a more stable language foundation. Although compatibility issues may still occur during the 1.x period, the team will be more cautious about adjusting language design going forward, striving to prevent existing code from frequently breaking due to version updates.
Currently, Mojo can be used for program development on CPUs, GPUs, and other compute accelerators. The team plans to add features such as async programming, pattern matching, and union types in the future. It is expected that the Mojo compiler and related toolchain will be open-sourced later this year, allowing developers to further participate in the Mojo ecosystem.