Soppo
A language that compiles to Go, adding ergonomic and type safety features that Go lacks. Soppo uses Go syntax wherever possible - if you know Go, you know most of Soppo.
See docs/DESIGN.md for language design.
Soppo is not production ready.
Installation
Soppo requires Go to be installed.
Download a pre-built binary from GitHub Releases.
Or build from source with Cargo (requires Rust):
Features
- Enums: Tagged unions with struct variants
- Pattern matching: Exhaustive matching with destructuring
- Error handling:
?propagation and? err { }custom handling - Nil safety: Compile-time nil checks
- Named arguments:
func(name: value)for clarity - String interpolation:
"value: {var}"syntax - Detailed error messages: Rust-inspired compiler diagnostics
Quick Look
// Enums with struct variants
type Shape enum
func calcArea(s Shape) float64
func printArea() error
func main()
Error Messages
The compiler catches errors early with helpful messages:
× Non-exhaustive match
╭─[main.sop:11:5]
10 │ var message string
11 │ ╭─▶ match colour {
12 │ │ case Colour.Red:
13 │ │ message = "Stop"
14 │ │ case Colour.Yellow:
15 │ │ message = "Wait"
16 │ ├─▶ }
· ╰──── missing variants: Green
17 │ }
╰────
help: Ensure all enum variants are handled, or add a `default` case
License
BSD 3-Clause. See LICENSE.