GALA is a statically typed, functional-first language that transpiles to Go. Every feature below is a language feature — checked by the compiler, compiled to plain Go, and usable inside an existing Go module without bindings, code generation, or a runtime.
The list is organised the way the language is: what you can express in the type system, how values and effects flow through a program, and what the toolchain does for you.
If you are evaluating GALA, three pages cover most of the story:
Option, Either, and Try replacing nil and the if err != nil cascade.sealed type Shape {
case Circle(Radius float64)
case Rectangle(Width float64, Height float64)
}
func area(s Shape) float64 = s match {
case Circle(r) => 3.14159 * r * r
case Rectangle(w, h) => w * h
} // drop a case and the build fails
| Feature | What it gives you |
|---|---|
| Sealed Types | Closed type hierarchies — algebraic data types with auto-generated constructors and extractors, so a value is exactly one of a known set of variants. |
| Pattern Matching | match expressions with struct destructuring, guards, nested and sequence patterns, custom extractors, and compiler-enforced exhaustiveness. |
| Type Inference | Lambda parameters, generic type arguments, and fold accumulators inferred from context — always resolving to a concrete Go type, never any. |
| Immutability | val bindings, immutable struct fields, generated Copy() with named arguments, structural Equal, and read-only ConstPtr[T]. |
| Feature | What it gives you |
|---|---|
| Error Handling | Option[T], Either[A, B], and Try[T] with Map, FlatMap, Recover, and pattern matching — no nil, no naked (T, error) pairs. |
| Monadic Binding | bind / also do-notation that flattens FlatMap chains, accumulates errors with Validated, and runs independent Future steps concurrently. |
| String Interpolation | s"Hello $name" and f"${value}%.2f" literals with inferred format verbs — no fmt import, no Sprintf call. |
| Collections | Immutable List, Array, HashMap, HashSet, TreeSet, and TreeMap with Map, Filter, FoldLeft, Collect, and SortBy. |
| Feature | What it gives you |
|---|---|
| Concurrency | Future[T] over goroutines — composable with Map, FlatMap, Zip, and Recover, plus cancellation, timeouts, and Race. |
| Concurrency Safety | Data races as a compile error: only deeply immutable values may cross a goroutine boundary, proved statically at Sendable boundaries. |
| Feature | What it gives you |
|---|---|
| Go Interop | Import any Go package and call it directly. Return types are read from the Go SDK, so there is nothing to declare or generate. |
| Compiler DX | Framed diagnostics with a caret and a hint, runtime panics that point at .gala source positions, and guaranteed tail-call optimisation. |
| IDE Support | IntelliJ/GoLand plugin and a gala lsp server for VS Code and Neovim — completion, inlay hints, go-to-definition, and live diagnostics. |
The pieces are designed to compose rather than to be adopted one at a time.
A sealed type is only as useful as the matching that consumes it, so sealed types and pattern matching share an exhaustiveness check. Option, Either, and Try are themselves sealed types, which is why error handling works with the same match syntax and why bind works over any of them without higher-kinded types.
Immutability runs underneath all of it: because val bindings and struct fields are immutable by default, the data-race check is silent in ordinary code and fires only where genuinely mutable state would escape to another goroutine.
And none of it is a walled garden — every feature compiles to ordinary Go and coexists with the Go ecosystem in the same module.
GALA-Exxxx diagnostic, and how to clear it.