I'm building a clarity-first language (compiles to C++)

Clarity-first 'ROX' sparks cheers, naming wars, and big questions about memory

TLDR: ROX is a new “no surprises” language that compiles to C++, making every error and type explicit. Commenters love the discipline but brawl over naming, ask about memory and destructors, compare it to Haskell-style safety, and even claim it could supercharge AI coding tools—big promises, bigger questions.

A new “clarity-first” language called ROX just dropped, promising no hidden tricks: no silent type changes, no exceptions, no sneaky control flow. It compiles to modern C++ and forces everything to be explicit—errors are values, lists are accessed only with .at(), and there’s just one loop. That’s the pitch. The comments? A whole soap opera.

The hype crowd loved the discipline. One fan asked the big, practical question: “How is memory managed?”—because clarity is cute until you’re leaking it. Another went straight for the naming police, declaring that if you can index it, call it an array or vector, not a “list.” Cue the naming war. A more academic voice rolled in with a Haskell comparison, essentially saying: neat idea, but lots of languages already make mutation harder—and they come with powerful tools to back it up. Translation: ROX’s clarity might be missing a magic wand.

Then came the curveball: an AI optimist cheered that strict languages like this could give AI coding tools tighter feedback loops to squash bugs—yes, ROX as LLM whisperer. And the C++ veterans? They cut to the chase: “Does it have destructors?” The vibe: love the rules, but show us the life-or-death details. Clarity is cool, but the crowd wants receipts.

Key Points

  • ROX is a minimal, clarity-first programming language that compiles .rox files to C++20 and then to native executables via clang++.
  • ROX removes implicit behavior (no implicit conversions, no exceptions, no operator overloading) and enforces explicit control flow and strict compile-time type checking.
  • Errors are values using rox_result[T]; list access via .at() returns rox_result[T], requiring explicit error handling with isOk/getValue/getError.
  • Language features include basic and container types, a single loop construct (repeat with range), built-ins for printing and error handling, and a math library for num32, num, and float.
  • The compiler is implemented in C++20; requirements include a C++20-compatible compiler and Make, with commands to run, format, generate C++, and compile.

Hottest takes

"If clarity is the goal, then data structures that support access by index should be called `arrays` or `vectors`" — sesm
"There are plenty of languages where functions cannot mutate their parameters or anything their parameters reference — Haskell is one example." — amluto
"deterministic compilers will give LLMs a tight feedback loop to catch bugs." — OsrsNeedsf2P
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.