Skip to content
Tech News
← Back to articles

Rubysyn: Clarifying Ruby's Syntax and Semantics

read original get Ruby Programming Language Book → more articles
Why This Matters

This article introduces Rubysyn, an experimental alternative syntax for Ruby that aims to clarify its syntax and semantics by adopting a Lisp-inspired, parsable, and sugar-free approach. This development is significant as it could improve code readability, consistency, and understanding of Ruby's complex array literal syntax, benefiting both developers and the broader Ruby community.

Key Takeaways

Rubysyn: clarifying Ruby's syntax and semantics

[WIP, 2026-04-01] This is an experiment in clarifying some aspects of Ruby syntax and semantics. For that we're going to introduce an alternative Lisp-based syntax for Ruby, preserving Ruby semantics.

The goal is to define a comprehensive, trivially-parsable and sugar-free syntax.

As I started working on this, I had to find a better explanation for some aspects of Ruby than what is available in standard documentation. So we also discuss some aspects of standard Ruby syntax and semantics.

See the spec/ directory for some corner cases of Ruby syntax and semantics that we are interested here.

Table of Contents

Array literals: full version

For some reason, the standard documentation does not explain full syntax of array literals.

Most common case of array literals is extremely well known:

empty array: [] ;

... continue reading