Welcome to the homepage of the Carth – a work-in-progress programming language with no great ambitions. It just wants to sit comfortably between Rust, Haskell, and Scheme, and to become the go-to language for its creator – me!
Although having existed for some years now, Carth is still in fairly early stages of development. The author has managed to do Advent of Code in it, but that's about as useful as it can be right now. There are no guarantees of stability, so if you do decide to try the language out – please beware that the whole building may at any point flip upside down right under your nose.
Also, I don't really keep this site up-to-date at all yet, so don't trust anything or anyone you encounter here!
- Scheme-inspired syntax and feel
- Static, Hindley-Milner typechecking à la ML
- Native compilation (with LLVM for now, but that is probably about to change!)
- Support for literate programming in Org-mode
Just to give you a quick taste. More examples can be found in the
(import std) (define main fizzbuzz) (define (fizzbuzz Unit) (for (range 1 100) (<o display fizzbuzz'))) (define (fizzbuzz' n) (match (Pair (divisible? n 3) (divisible? n 5)) (case (Pair False False) (my-show-int n)) (case (Pair True False) "Fizz") (case (Pair False True) "Buzz") (case (Pair True True) "Fizzbuzz"))) (define my-show-int (fmatch (case 1 "one") (case 2 "two") (case n (show-int n))))