About EK9

EK9 Language Development

Follow the EK9 Blog for updates on the design and implementation of EK9. For a look at the compiler's internals, see the Javadoc; it is work in progress, but it shows how the compiler is structured.

The EK9 Language Itself

If you come from Java, C#, Python, Javascript, Scala or Kotlin, you will pick up EK9 quickly. It takes many ideas from those languages and adds new ones.

The EK9 compiler and runtime are proprietary software; the text of this site and every example on it are CC0 1.0. See the license for details.

Experienced developers will be thinking "Show me the code; I'll understand it and get going", so there is a list of examples below.

Some of the syntax may look alien, especially parameter passing; give it time. If you get stuck, read structure, basics and then operators.

More about the language

EK9 is designed so that inexperienced developers can get started, with features for experienced software engineers, and it is designed with AI in mind. Its constructs range from the very simple to advanced design patterns built into the language.

The language is 'semantically consistent': an idea that applies in one area applies in a similar or exact way in others. For example, operators such as '+', '-', '*', '/' and '$' (to string) can be used polymorphically on any user-defined type. That is like C++, but EK9 adds strict semantics that limit mutation and misuse inside those operators. The same constraints apply to human developers and AI tools alike, which stops inappropriate use and keeps the language consistent.

Easy things are 'easy', and harder things are 'structured and coherent'. EK9 is meant to serve a developer for a whole career, not only as a teaching language.

Software design rules are built in: complexity, nesting, and function and method parameters. Code that breaks them does not compile. See quality, testing, coverage and profiling.

The layout and syntax are designed for visual flow and structure. They take ideas from existing languages and from 'cognitive research' on how people read text.

For the rationale behind the language, read the introduction or its new starters section. The philosophy of EK9 explains why some capabilities are included and others are not.

Downloads

Once you have looked at the examples below and think EK9 might suit you, install it:

  1. Download the compiler for macOS, Linux or Windows from the EK9 repository.
  2. Unpack it (zip, tar.gz or dmg) in a directory of your choice, with no spaces in the path.
  3. Install Java 25 or later; Azul and Graalvm both work. Put Java's bin directory on your PATH.
  4. Put the directory you unpacked EK9 in on your PATH, and set the environment variable EK9_HOME to the same directory.
  5. Create a new directory (no spaces in the path) and paste the Hello World example into a file called helloworld.ek9.
  6. At a command line prompt, type ek9 helloworld.ek9.
  7. If your installation and PATH are right, you will see "Hello, World". You're on your way.

EK9 finds the source files that need compiling, then runs the one you name. For more, read the EK9 command line page.

For editing:

If you are interested in the compiler internals, there is Javadoc available.

Now the examples

The examples are part of these pages, with the explanation around them; if some syntax is unclear, read the text around the example. They start simple and become involved quickly. If you get stuck, go back to the earlier examples in the list.

Basic examples

Detailed examples

These start simply and become progressively more abstract.

Fully worked examples

Every example on these pages is compiled by the EK9 compiler, and every one that declares its output is run and checked against it. They are public domain (CC0 1.0). Download one from under the example, or all of them, with the Q&A and the error catalogue's sources, as ek9-examples.zip. The same material is in data/ as data files.