Ikko is a language in development that
Ikko is just starting development. If you look at the roadmap below, you can see that most features haven't been built yet. The example shown here does run, however.
fn main():
let list = prepend(5, prepend(4, prepend(3, End)))
if contains(list, 3):
print("List contains 3\n")
if contains(list, 10):
print("List contains 10\n")
type List<T> enum:
End
Link:
value T
next List<T>
fn contains(list, val):
match list:
End:
return False
Link(n, next):
return n == val || contains(next, val)
fn prepend(val, list):
return Link{value: val, next: list,}
You can find the source code on github.
To build Ikko, you will
need Haskell
Stack installed. From there, you can run make
inside the repository.
To run an example, run a command like stack exec ikko --
examples/fib.ik
.
Some new languages bring exciting new ideas to the table. This is not one of those. The goal of Ikko is to maximize the ROI on novelty, and to be the best language possible using only techniques and features that are reasonably well established.
Ikko comes from my frustration with other programming languages. I found that I was often thinking, "this language would be so much better if it just had X from language Y." There was no single langauge that, to me, felt like it had quite the right mix.
I like Haskell's type system, but the language is clunky to work in day-to-day. Rust has a similarly good type system, but I want a garbage collector (I don't do systems programming) and better support for immutability. I like the light syntax and fluid tooling of Go, but it forces you to write endless boilerplate to do anything modestly clever.
status: Done!
This includes basics, like input and output, access to characters within strings, basic data structures, and commonly used functions.
Add support for closures, match and conditional expressions, and short function syntax.
Add support for breaking code into multiple packages and multiple files.
These are haskell-like type classes.
Create a small standard library and add support for importing 3rd party libraries.
In addition to the interpreter, add a compiler backend that produces efficient binaries.
Define the language in as much detail as possible so that there can be multiple correct implementations.
Future features may include a REPL, support for checked imutability, an effect system, compiler-derived code, compile-time programming, and reflection.