HeadlinesBriefing favicon HeadlinesBriefing.com

Rhombus 1.0 Merges Racket Metaprogramming with Python-like Syntax

Hacker News •
×

The Racket project has launched Rhombus 1.0, a new programming language that combines Lisp-style metaprogramming with Python-like syntax. Developed by researchers at the University of Utah and Chinese University of Hong Kong, Rhombus aims to bridge academic innovation with practical application. The language features indentation-based syntax using ':' for blocks and '|' for conditional branches, making it more approachable than traditional Lisp while retaining powerful macro capabilities.

Rhombus introduces innovative reducers that let loops produce lists, maps, sets, or boolean values directly. Unlike conventional languages, its macros can extend core language features, including creating custom reducers. The syntax objects carry metadata like line numbers and scope information, enabling better error messages and hygienic macro design. A factorial example demonstrates both imperative and functional styles using the same language construct.

The language supports gradual type systems where annotations provide static information for error checking and code generation. Developers can attach custom static metadata, such as tracking data flow or runtime complexity. While rooted in academia, Rhombus already powers real applications like the Economancy card game. The core uses MIT/Apache 2.0 licenses, leveraging Racket's existing runtime and compiler infrastructure for immediate practical adoption.