Gen-AI native programming language
What might a Gen-AI native programming language look like? Currently, the interaction with AI through prompts shows its limitations: it lacks precision and is prone to errors or “hallucinations”. These prompts are more of a means of communication than a way of execution. In contrast, traditional programming languages, as concrete carriers of logic, can drive hardware operations efficiently and at low cost.
Will we still write code by hand? Although large AI models have their advantages in assembling and splicing together the various knowledge that humans have already created, they cannot perform original creation. In high-value work, the role of human programmers is even more important: high-value tasks in programming will increasingly rely on human-machine collaboration models, where humans control the core creative aspects and AI assists with processing details and repetitive coding tasks. This transformation is similar to the shift from traditional handcrafts to industrialized production, and represents a fundamental change in the design requirements of the programming field.
Many of the skills and norms of handcrafts will be completely changed by the power of industrialized production. Just as we transitioned from an agricultural society to an industrial society, the definition of culture and beauty also evolved. Programming languages that were designed for handcrafts in the past may not be suitable for the future industrialized code production. Low-level, verbose development languages (such as those that require manual memory management) are no longer a barrier to efficiency. Languages that provide freedom and creativity will not significantly improve the efficiency of machine-generated code.
Even if large models are able to fully understand semantics and follow instructions perfectly in the future, the hallucination problem of LLMs still poses a major challenge to the usability of generated code. Faced with the massive amount of automatically generated code in industrialization, we need a rigorous language that can quickly verify correctness. Seemingly correct code generated by LLMs in seconds may contain complex errors (such as memory leaks) that can take hours to discover. This not only undermines efficiency, but also exacerbates the distrust between humans and machines. If a language can be run with high probability after compilation, the efficiency of using it for industrial production will be greatly improved.
The adoption of generative AI will lower the barrier to entry for software development, and it is expected that a large number of non-professional developers will emerge in the future, who will use generative AI to develop innovative applications. Although these developers may not be experts in writing code, or even fully understand all the details of the language, they need to be able to quickly understand what logic each part of the code is executing and what side effects it may cause. This understanding is critical for building trust in generated code and for facilitating fine-tuning of the code. Languages that overemphasize abstraction and encapsulation may pose many challenges.
Looking to the future, we need to think boldly: what kind of programming language can meet the needs of verifiability and understandability of industrialized code? Rust may be a good choice at present. However, the world is diverse, and the development of programming languages may also exceed our imagination. (Bold statement) If a future programming language that uses Chinese characters can meet these requirements, then why not consider this possibility?
Co-authored and translated by ChatGPT, Image generated by Dalle