Icelang (stylized "icelang") is a simple and high-level programming language created for the purpose of learning about programming language design and implementation. The goal of this project is not to create a general-purpose programming language for use in the real world. Although I'm not intentionally making icelang a "bad" language for real-world usage, it's simply not designed for that use case. If you're looking for a language more suitable to general use, I'd recommend taking a look at any of the languages listed below as sources of inspiration for the design of icelang.
icelang is dynamically typed, and intended to be an interpreted language. Some of the design goals for icelang include:
- To be simple to understand and write an interpreter for, but still powerful enough to solve non-trivial problems without excessive hullabaloo
- To be expressive where doing so doesn't significantly sacrifice simplicity or encourage writing error-prone code
- To be provably turing-complete
The design of icelang takes inspiration from many languages, primarily JavaScript, Python, and Rust.
For a full guide on setting up the icelang interpreter and writing your first program, check out the Getting Started guide. For a general overview of the syntax and features of icelang, check out The icelang Guidebook. You can also check out the examples folder to see some example icelang programs.
Here's a simple "hello world" program, written in icelang:
println("Hello, world");
And a program to print the first 10 Fibonacci numbers:
// A simple program to print the first 10 Fibonacci numbers
let a = 0;
let b = 1;
loop 10 {
println(a);
let c = a;
a = b;
b += c;
};
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.