Skip to content
David Jeske edited this page May 8, 2017 · 67 revisions

The Irken Language

Irken is a simplified, statically-typed dialect of Scheme. It uses an ML-like type system supporting parametric polymorphism (i.e., "let polymorphism"), algebraic datatypes, and row types (structural types). With type inference and a pattern-matching syntax, it could be considered ML with a lisp/scheme syntax. For the motivation behind Irken, see History.

We think Irken is cool because:

  • type-declarations are not required -- like in Python, Ruby, Javascript, or Clojure
  • type errors are reported at compile time -- like in Haskell, Java, C#, or C++
  • structural typing supports Duck Typing -- like OCaml or Google Go
  • it uses heap allocated stack frames -- like Scheme, Google Go, or Stackless Python

The compiler and libraries are distributed under a simplified BSD License.

Features

Syntax

Irken's syntax is nearly identical to Scheme's. The main differences are:

  • postfix array-indexing (e.g., (+ x[i] y[i]))
  • record literals and field access, e.g. {field0=10 field1="foo" field2="bar"}, a.field1
  • colon (:) is a reserved character, it identifies constructors.
  • pattern-matching expressions and function definitions, which use ->

[A few other discrepancies will remain undocumented in the hope that they will someday be fixed]

Restrictions

  • Lists are monomorphic, all elements must be of the same type
  • No function overloading or multi-methods. Each function has a single type signature.
  • No runtime dynamic casting. It's not possible for a function to take any type.
  • No runtime reflection information. Though information can be built and saved by macros.
  • Currently no REPL loop. All programs are compiled.

Next: Simple Code Examples


References

Clone this wiki locally