hn.today

The Golden Spike, and Resurrecting the Vale(n) Programming Language

verdagon.dev14 points0 comments
Screenshot of The Golden Spike, and Resurrecting the Vale(n) Programming Language

Evan Ovadia lays out an ambitious plan to build Valen, a new language that achieves seamless, memory-safe interoperation with Rust. Framing the effort as a "golden spike" joining two distant systems, the project targets true cross-language generics, linear types, group borrowing, and the ability for Valen closures to implement Rust traits so Valen code can directly use Rust libraries (example: passing a Valen closure as a Rust callback for a windowing/graphics library). The central technical obstacle is ABI mismatch: Rust lacks a stable ABI and the ubiquitous C ABI bridge does not support generics, so calling generic Rust functions from another language is fundamentally blocked unless a different technique is used.

The chosen technique avoids reimplementing Rust generics by lazily generating equivalent Valen AST signatures for Rust items and integrating with rustc’s monomorphizer and optimizer to enable inlining and callbacks across languages. The compiler and runtime work is experimental but already supports linear types, group borrowing across the boundary (except closures), and zero-sized struct interop; generational references and some features remain disabled. The broader goals include a borrow checker without shared-xor-mutable, Zig-style comptime, resource-safe mutable Rc, better async/enums, and high-performance cross-language calls; the project is a work-in-progress with source code available.

Read on verdagon.dev0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.