| CARVIEW |
Select Language
HTTP/2 200
date: Tue, 30 Dec 2025 09:11:30 GMT
content-type: text/html; charset=utf-8
x-amz-id-2: iKGRxEZQtD64qOaYPXFOBBfRansagTpLFgKMDa1MEXeoJ2atwntOnQqMrXiaNC2PAmMDxk6rtwg=
x-amz-request-id: PF4ZKY05P4EHCS8S
cache-control: max-age=0, no-cache
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=rwq9TpxKxhAhe3E7sia0YOegij2PpFpGuNkuvTvMF54pLQi0tBvHP0QA9dhcWFI8EwCkvY9zfA3W7h4CHohNLQJbF%2Bs1RTsGjJFhP3tvqQE%3D"}]}
last-modified: Wed, 24 Dec 2025 00:45:50 GMT
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
x-amz-storage-class: REDUCED_REDUNDANCY
server: cloudflare
cf-cache-status: DYNAMIC
vary: accept-encoding
content-encoding: gzip
cf-ray: 9b6068fd5a41ca57-BOM
alt-svc: h3=":443"; ma=86400
Rhombus Programming Language
Rhombus
Rhombus is a general-purpose programming language that is easy to use and uniquely customizable.
❮
❯
// simple syntax for everyday tasks class Rect(left, top, right, bottom) fun area(r): let w = r.right - r.left let h = r.bottom - r.top w*h area(Rect(0, 0, 10, 5)) // ⇒ 50
// pattern matching on objects, lists, and maps class Rect(left, top, right, bottom) fun rect_like_to_rect(v): match v | Rect(_, _, _, _): v | {"LT": [l, t], "RB": [r, b]}: Rect(l, t, r, b) | {"TL": [t, l], "BR": [b, r]}: Rect(l, t, r, b) rect_like_to_rect({"LT": [0, 2], "RB": [10, 5]}) // ⇒ Rect(0, 2, 10, 5) rect_like_to_rect({"TL": [0, 2], "BR": [10, 5]}) // ⇒ Rect(2, 0, 5, 10)
// `:` for nesting, `|` for alternatives, // `::` for type-like checked annotations fun repeat(str :: String, n :: NonnegInt) :: List: if n == 0 | [] | [str] ++ repeat(str, n-1) repeat("hello", 3) // ⇒ ["hello", "hello", "hello"] repeat(3, "hello") // ⇒ error: 3 is not a String
// ellipses to create and use repetitions fun all_same([str0, str, ...]): all(str0 == str, ...) all_same(["hello", "hello", "hello"]) // ⇒ #true all_same(["hello", "goodbye", "hello"]) // ⇒ #false
// pattern matching in all binding positions class Posn(x, y) fun flip_all([Posn(x, y), ...]): [Posn(y, x), ...] flip_all([Posn(1, 2), Posn(3, 4)]) // ⇒ [Posn(2, 1), Posn(4, 3)] flip_all([Posn(5, 6)]) // ⇒ [Posn(6, 5)]
// efficient functional data structures class Tree(val, children :: List.of(Tree)): method flatten(): // O(N lg N) for N `val`s for fold(lst = [val]) (child in children): // because append with `++` is O(lg N) lst ++ child.flatten() Tree(1, [Tree(2, [Tree(4, [])]), Tree(3, [Tree(5, [])])]) .flatten() // ⇒ [1, 2, 4, 3, 5]
// syntax as data fun interp(e): match e | '$(n :: Number)': n.unwrap() | '$lhs ... + $rhs ...': interp('$lhs ...') + interp('$rhs ...') | '$lhs ... * $rhs ...': interp('$lhs ...') * interp('$rhs ...') interp('1 + 3 * 4') // '' quotes syntax, not a string // ⇒ 13
Built on Racket
... which means that Rhombus is compiled to machine code on-the-fly, benefits from a mature tool chain and package system, and has many practical libraries within reach.
Why a new language? See Rhombus Goals.
DownloadRhombus is ready for early adopters.Documentation
Includes a Quick Start.
Work in ProgressComplete and stable enough to be useful, but not all done.