Skip to content
TopicTracker
From HackerNewsView original
TranslationTranslation

Flexible Metaprogramming with Rhombus

Rhombus is a new language built on the Racket platform that aims to bring flexible metaprogramming capabilities to a C-style syntax. The article explores its macro system, which allows developers to extend the language syntax in powerful ways while maintaining readability and composability.

Background

- Rhombus is a new language being developed on top of Racket, a mature dialect of Lisp known for its macro system and language-oriented programming. The project aims to replace Racket's traditional S-expression (parentheses-heavy) syntax with a more conventional, Python-like syntax while preserving Racket's powerful metaprogramming (code that writes code) capabilities. - This matters because Racket's core strength—letting programmers create their own domain-specific languages—has always been tied to its Lisp-like syntax, which many find off-putting. Rhombus attempts to make those powers accessible to programmers who prefer Algol-family syntax. - The article discusses "flexible metaprogramming" in Rhombus: compile-time code transformations that go beyond simple macros, allowing things like automatic generation of boilerplate, custom syntax for specific problem domains, and static checks embedded in the language. - Key figures: Matthew Flatt (lead designer of Racket and Rhombus), who has spent decades working on language-oriented programming and macro systems at the University of Utah and elsewhere.

Related stories