Ikko Language

What is Ikko?

Ikko is a language in development that

  • Is statically typed with type inference
  • Is garbage collected
  • Has no null value
  • Has generics
  • Offers pattern matching
  • Has sum types
  • Has a light syntax

Status

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.

Example

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,}

More about Ikko

Getting Ikko

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.

Goals

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.

Roadmap

Milestone 0: Basic type inference

status: Done!

Milestone 1: Define useful functions

This includes basics, like input and output, access to characters within strings, basic data structures, and commonly used functions.

Milestone 2: Powerful expressions

Add support for closures, match and conditional expressions, and short function syntax.

Milestone 3: Packages

Add support for breaking code into multiple packages and multiple files.

Milestone 4: Add type classes

These are haskell-like type classes.

Milestone 5: Basic usability

Create a small standard library and add support for importing 3rd party libraries.

Milestone 6: Compiler back end

In addition to the interpreter, add a compiler backend that produces efficient binaries.

Milestone 7: Language spec

Define the language in as much detail as possible so that there can be multiple correct implementations.

Future work

Future features may include a REPL, support for checked imutability, an effect system, compiler-derived code, compile-time programming, and reflection.

Contact

I'm most easily reached on twitter.
You can also find me on my blog.

Pull requests and issues on github are also welcome.