Calls read like expressions
Whitespace applies functions. Holes, lambdas, composition, and low-precedence application derive callables without extra ceremony.
Experimental programming language · Java 21 prototype
Caret uses whitespace for function application and indentation for blocks. Contracts, missing values, persistent collections, and reflection stay visible in ordinary code.
// application needs no commas
add a b =
a + b
double value = value * 2
addThenDouble = add >> double
print addThenDouble 2 3
// 10
01 / Why Caret
Caret asks how much routine syntax a language can remove while remaining readable and statically analyzable. The prototype is small, runnable, and deliberately explicit about absence, effects, and reflective visibility.
Whitespace applies functions. Holes, lambdas, composition, and low-precedence application derive callables without extra ceremony.
? is present null. ~ is missing. Optional access makes expected absence a value instead of an exception.
Contracts and effect bounds describe callable interfaces; reflection exposes language-owned metadata filtered by the current environment.
02 / The language
Five runnable examples of the prototype’s central ideas.
Leave a hole and Caret returns a function waiting for the missing value. Specialized helpers emerge naturally from ordinary expressions.
03 / Prototype status
The Java 21 tree-walking interpreter implements a substantial core. The broader language remains a staged roadmap, not a promise that every specified idea runs today.
Closures, recursion, lambdas, holes, composition, overloads, callable contracts, and inferred contracts and effects.
Numbers, Unicode text, Booleans, null, missing, persistent sequences, dictionaries, exported Collections, and structural equality.
Derived and parameterized contracts, refinements, callable metadata, safe dynamic lookup, and environment-filtered reflection.
Modules and imports, compile-time #, sandbox execution, semantic code reification, containers, cycles, formats, SIMD, rules, and rulesets are documented language work—not current prototype features.
Try the prototype
Caret needs Java 21. Download a release or clone the repository, then run the included feature programs and inspect the implementation.
Get Caret and run it ↗