Modern Language of the AI Era
Modern Languages
A modern language refers to a language that offers higher productivity, stability, security, and maintainability compared to languages of the past. These languages actively incorporate the latest techniques and concepts, providing developers with more efficient and secure development tools. Representative modern languages include Java, Rust, Python, and TypeScript, and they possess the following characteristics.
1. Object-Oriented Design ( OOP )
Most modern languages are designed based on object-oriented concepts. Object-oriented design supports principles such as encapsulation, inheritance, and polymorphism, making program structure clear and flexible by managing complex systems divided into small units of objects. This is particularly effective in controlling development costs and effort during large-scale software development and in reducing issues that may arise during maintenance.
2. Syntactic Sugar and Expressions
Modern languages provide various syntactic sugar and expression-based syntax to enhance code readability and development productivity. Features such as the ternary operator, lambda expressions, and pattern matching reduce boilerplate code, make code predictable, and improve developer productivity.
3. Module System
Modern languages allow programs to be managed by separating them into multiple units through a module system. This facilitates code reusability and dependency management and makes maintenance easier even as project size increases. Representative examples include Java's Maven/Gradle, Rust's Cargo, and TypeScript's npm/yarn.
4. Intermediate Language and Virtual Machine
Modern languages adopt intermediate languages and virtual machines for platform independence, performance optimization, and security. Representative examples include JVM, LLVM, WASM, and GraalVM.
Development in the AI Era and Limitations of Modern Languages
Modern languages emerged under the premise that humans write most of the code. Naturally, the purpose of modern languages is to reduce repetitive tasks, increase productivity, and effectively implement large software through a structure that allows developers to collaborate. However, in the AI era, this premise is gradually eroding. AI-based tools such as Copilot and Cody are automating large parts of code writing, and the amount of code a single developer can produce is dramatically increasing. Consequently, the characteristics of modern languages, which were previously perceived as advantages, are gradually transforming into outdated disadvantages.
Object-Oriented Design
AI can quickly and accurately analyze a structure where all information is explicitly stated within a single function or module. Conversely, as the context increases, the sections for inference expand, leading to lower AI productivity and accuracy. Code written with OOP distributes logic across multiple objects rather than managing it in one place, which consequently requires more context for AI. Consider the code below.
1public class AnimalHandler {
2 // Handles animal actions
3 public void handle(Animal animal) {
4 animal.speak();
5 }
6}
7
8public class Main {
9 // Main method to demonstrate animal handling
10 public static void main(String[] args) {
11 AnimalHandler handler = new AnimalHandler();
12
13 Animal a1 = new Dog();
14 Animal a2 = new Cat();
15 Animal a3 = new Horse();
16
17 handler.handle(a1);
18 handler.handle(a2);
19 handler.handle(a3);
20 }
21}
In the code above, for AI to understand what the speak() method actually does, it must repeatedly perform the following inferences:
- What specific class instance is
animal
? - Where is the
speak()
method overridden in that class defined? - Where are the definitions of the Dog and Cat classes, and what are their internal operations?
- Is there a possibility that the Dog and Cat classes could be overridden by other classes?
This information is not gathered in one file or one function but can only be understood by tracing the relationships between class files and the inheritance structure. Furthermore, elements determined at runtime, such as reflection or dynamic loading, are like black boxes from the AI's perspective, making analysis virtually impossible.
Syntactic Sugar and Expressions
AI prefers explicit operations over implicit ones and prefers combining simple structures to produce a single correct answer rather than using complex structures. In contrast, syntactic sugar allows for various expressions, while their internal operations are often identical or similar. AI must learn the meaning of these diverse expressions individually, and it can become difficult to judge the priority of which syntax to recommend in a specific situation.
Intermediate Language and Virtual Machine
AI primarily learns based on source code. On the other hand, in intermediate language (bytecode), meaning such as variable names is removed during the compilation process, and it must be reinterpreted by the virtual machine at execution time. This is a task that is very difficult for AI to understand or convert. For example, conversion from TypeScript to Go is possible for AI, but converting the V8 engine's bytecode to JVM bytecode or machine code is virtually impossible.
The True Modern Language of the AI Era
Through the content above, we can understand that the characteristics of modern languages are actually outdated elements not suited for the AI era. So, what language could be the most suitable modern language for the AI era? We can gain hints from the elements that past modern languages rejected. A modern language of the AI era should:
- Possess explicit syntax and a natural flow.
- Move away from excessive OOP structures and have a flat and simple structure.
- Create various functionalities using a limited set of basic keywords, rather than unnecessary syntactic sugar or implicit patterns.
- Have a simple and predictable build system rather than a complex one.
The language that best fits these criteria is Golang. The Go language was designed to implement most practical functionalities with a minimum of core keywords and simple syntax combinations, strictly excluding unnecessary abstraction and implicit behavior. This structure is advantageous not only for human developers but also for AI in interpreting and generating code.
Thus, Go's characteristics, which aim for a predictable and flat structure, explicit flow, and consistent syntax, are better suited to a development environment where AI actively participates, unlike existing modern languages designed based on human developers. The conservative design philosophy of Go, once considered outdated, is, in fact, becoming the most advanced choice in the AI era.