Luma Progress Update: Smarter Compiler, Type-Safe Lists, and a Vision for Extensibility
Today marks a major milestone in the evolution of Luma, our lightweight, expressive, and type-safe scripting language. Our focus was squarely on list operations and compiler robustness.
Here’s what we accomplished:
Type-Safe List Operations
We implemented strongly-typed list functions across all core types:
add,add_all,remove,remove_at,remove_all,sort- All supported for:
int,float,str,bool,byte
This brings full parity between the Luma syntax:
nums: [int] = [1, 2, 3]
nums.add(4)
nums.remove(2)
nums.sort()…and the generated Go code:
var nums []int = []int{1, 2, 3}
_luma_list_add_int(&nums, 4)
_luma_list_remove_int(&nums, 2)
_luma_list_sort_int(nums)No interface{} pollution. No unsafe casts. Just real Go, generated with precision.
Refactored Compiler: No More Spaghetti
Our compiler was growing fast - and with speed comes entropy. So we paused, zoomed out, and redesigned the structure of our compiler:
Key Improvements:
- Grouped logic into clear sections: setup, emission, expressions, utils
- Extracted function call logic into its own handler
- Centralized type inference and sanitization
- Every function is now documented with why, not just what
This was critical not just for clarity, but for what’s coming next.
Direction Moving Forward
Luma is gaining traction as a type-inferred, embeddable, and expressive language. Here’s what we’re enabling:
Coming Next
.intersect()for lists with type safetywalk()andmap()support for functional-style workflows- Advanced slicing:
nums[1..3] - Nullable and fallback-aware conversions across types
- Immutable operations (
nums + [x], nums - [x]) - Compiler plugin traits (filter, indexable, sortable)
Testing & Quality
Our philosophy is simple: new features must not break existing ones.
We’ve locked in this rule:
Every new syntax or type must pass regression tests before merging.
Today’s work included:
- Reinstating and fixing core parser tests
- Hardening type resolution during list construction
- Ensuring expression hints propagate properly (e.g. for
add_all)
The Foundation Is Solid
With today’s refactor, we’re confident in saying: Luma is no longer a prototype - it’s a platform. Adding features will now be incremental, predictable, and clean.
The compiler is clean. The vision is clear. And Luma is just getting started.