Zeen: A New Systems Programming Language with a Comptime Engine
Website: zeen-lang.tech Github: mealet/zeen (Would appreciate if you'd leave a star on Github) What is Zeen Zeen - a modern systems programming language designed for simplicity, safety, and predictable control over memory. It provides toolchains and compiler rules to operate data easily and drop it automatically after usage with move semantics to avoid any runtime overhead. The main idea is to…
Zeen - a modern systems programming language designed with simplicity, safety, and predictable memory control. It offers toolchains and compiler rules for easy data manipulation and automatic deallocation after use via move semantics. The primary goal is to develop efficient software with most errors caught during compilation. Zeen draws design elements from Rust and Zig, making it accessible for developers familiar with those languages. It introduces unique features related to ownership, memory management, and compile-time execution.
The language boasts a suite of development tools, including compiler and standard libraries. It provides editors' plugins for VS Code and Neovim, a package manager named Zora, and a simple example demonstrating its capabilities. The code snippet showcases printing values of different types using the print_this function.
A recent update in version v0.4.0 introduced several enhancements, such as improved frontend performance, a new warnings system, additional macros, fixed C ABI, and most notably, a revamped Comptime Engine. This engine allows certain evaluations or constructions to be moved away from runtime to the compiler. Developers can define and evaluate constants, create Comptime functions for constructing new types, export expressions and declarations, emit declarations into the current scope, and format print at compile time.
Examples illustrate simple constant definitions and splicing, as well as advanced usage including declarations, type values, and more. The source material also includes a code snippet that demonstrates defining a struct at compile time, emitting it, and printing its values - showcasing the compile-time capabilities of Zeen's Comptime Engine.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.