Top 1,000 Features Creators Resources Blog Explorer Download
GitHub icon

Koka

< >

Koka is an open source programming language created in 2012 by Daan Leijen.

Source code:
git clone https://github.com/koka-lang/koka
#143on PLDB 12Years Old

Try now: Web · TIO

Koka language compiler and interpreter


Example from the web:
fun hello-ten() var i := 0 while { i < 10 } println("hello") i := i + 1
infix infixr infixl type cotype rectype alias struct con fun function val var external if then else elif return match private public private module import as include inline rec try yield enum interface instance

Language features

Feature Supported Token Example
Integers ✓
// [0-9]+
Floats ✓
// [0-9]+\.[0-9]+([eE][\-+]?[0-9]+)?
Hexadecimals ✓
// 0[xX][0-9a-fA-F]+
Conditionals ✓
Access Modifiers ✓
Functions ✓
Comments ✓
// A comment
Line Comments ✓ //
// A comment
Print() Debugging ✓ println
Semantic Indentation X

View source

- Build the next great programming language · About · Acknowledgements · Extensions · Day 625 · feedback@pldb.io