On this page:
Rhombus
8.17.0.6

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 Rhombus. For more information, see Rhombus Reference. For a complete specification of Rhombus, see also Rhombus Language Model and Rhombus Metaprogramming Reference.

    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

    8 Static Information, Binding, and Annotation

      8.1 Static Information

      8.2 Representing Static Information

      8.3 Rules for Static Information

      8.4 Annotation Low-Level Protocol

      8.5 Binding Low-Level Protocol

    9 Defining Languages

      9.1 Module ~lang Protocol

      9.2 Run-Time and Expand-Time Configuration

      9.3 #lang Language Protocol

    10 Building and Running Rhombus Programs

      10.1 Editing Rhombus Programs

      10.2 Running Rhombus Programs

      10.3 Using main and test Submodules

      10.4 Standalone Rhombus Programs

      10.5 Command Line Parsing

    11 Using Racket Tools and Libraries