On this page:
Rhombus
9.0.0.10

Rhombus🔗ℹ

Rhombus is a general-purpose programming language that is easy to use and uniquely customizable.

Rhombus is built on Racket, and it is extensible in the same way as Racket, but Rhombus uses a more conventional expression syntax. No familiarity with Racket is required to use Rhombus.

This document is a general guide to the language. For more documentation, see Getting Started with Rhombus.

    1 Quick Start

    2 Rhombus Essentials

      2.1 Notation

      2.2 Modules, Variables, and Functions

      2.3 Classes and Binding Patterns

      2.4 Annotations and the Dot Operator

      2.5 Optional and Keyword Arguments

      2.6 Conditionals and Pattern-Matching Dispatch

      2.7 Operators

      2.8 Variables and Values

      2.9 Namespaces

    3 Collections and Iteration

      3.1 Lists

      3.2 Arrays

      3.3 Maps

      3.4 Sets

      3.5 Repetitions

      3.6 Iteration

      3.7 Ranges

      3.8 More Function Arguments

      3.9 Function Shorthand and Pipelines

    4 Classes and Interfaces

      4.1 Subclasses

      4.2 Interfaces

      4.3 Methods

      4.4 Fields and Properties

      4.5 Constructors

      4.6 Private Fields and Methods

      4.7 Private Implementation

      4.8 Class Namespaces

      4.9 Mutual Dependencies

    5 Input, Output, and Strings

      5.1 Printing Strings and Other Values

      5.2 String Interpolation

      5.3 Input and Output Ports

      5.4 Closeable Objects

      5.5 Regular Expressions

        5.5.1 Regular Expression Language

        5.5.2 Full versus Partial Regexp Matching

        5.5.3 String, Byte String, and Port Matching

        5.5.4 Regexp Quick Reference

    6 Syntax Objects and Macros

      6.1 Syntax Objects

      6.2 Expression Macros

      6.3 Definition and Declaration Macros

      6.4 Binding and Annotation Macros

      6.5 Class Binding and Annotation

      6.6 Syntax Patterns and Syntax Classes

    7 Annotations

      7.1 Combining Annotations

      7.2 Annotations for Optional Values

      7.3 Annotations from Predicates

      7.4 Annotations as Converters

      7.5 List Annotations

    8 Defining Languages

      8.1 Module ~lang Protocol

      8.2 Run-Time and Expand-Time Configuration

      8.3 #lang Language Protocol

    9 Building and Running Rhombus Programs

      9.1 Editing Rhombus Programs

      9.2 Running Rhombus Programs

      9.3 Interactive Rhombus REPL

      9.4 Using main and test Submodules

      9.5 Standalone Rhombus Programs

      9.6 Command Line Parsing

    10 Using Racket Tools and Libraries