Luon is a newly introduced high-level programming language that merges syntax elements from Oberon+, Oberon-07, and Oberon-2, while incorporating features from Lua and targeting the LuaJIT VM. Its name, a combination of “Lua” and “Oberon,” reflects its fresh take on Lua with a statically typed design. This language offers developers the ability to declare external procedures, allowing integration with Lua and C libraries through the LuaJIT foreign function interface. This feature enhances the reusability of existing libraries, making Luon a versatile choice for programmers. The language also comes with a new IDE, making it even more convenient for developers to use.
Luon was created by Rochus Keller, who drew inspiration from his experience with Smalltalk-80 and SOM VM implementation, as well as his aspirations to create a LuaJIT-based Interlisp VM. While similar to Oberon+, Luon eliminates pointers and relies on reference semantics for all structured data types, which are dynamically created. The language introduces key data types such as ARRAY, HASHMAP (ensuring compatibility with Lua), and an immutable STRING type with value semantics.
One of the main goals of Luon is to address several shortcomings observed in Lua during prior projects. It offers improvements such as conditional compilation, efficient constants, inline declaration, compile-time error detection, strict local usage, and switch/case statements. These features aim to save computation time, eliminate the need for local slots or hashed element access, provide better code structuring, prevent implicit global declarations and other errors, ensure locals cannot be used before declaration, and reduce repetitive relational expressions.
The language specification and sample code are available in the project’s repository, providing developers with a comprehensive guide to Luon’s capabilities. Discussions on Hacker News highlight how developers have been eagerly waiting for a programming language like Luon. Keller, who is also present in the discussions, explained that he put his Micron language projects on hold to implement Luon, as he believed it was more important at the moment.
In conclusion, Luon is a promising new programming language that combines the best features of Lua and Oberon. With its versatile design and improvements over Lua, it has the potential to become a popular choice among developers. Its availability on the LuaJIT VM and comprehensive documentation make it a language worth exploring for any programmer.