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;
};
icelang is still in development, and has a number of incomplete or missing features:
- Make a cool logo
- Guidebook
- Language features
- Program structure
- General program structure
- Keywords
- Operators
- Separators
- Identifiers
- Values and types
- Control flow
- If/else statements
- Loops
- Simple loops
-
while
loops -
for
loops
- Match statements
- Jump statements
-
break
-
continue
-
return
-
- Declarations
- Variable declarations
- Function declarations
- Expressions
- Literals
- Variable access
- Operations
- Program structure
- Standard library features
- Language features
- Implementation
- ice (binary)
- REPL
- File interpreter
- lexer
- TODO expand
- parser
- TODO expand
- interpreter
- TODO expand
- ice (binary)
- Testing
- Unit tests
- General unit tests
- Property-based tests (where applicable)
- Integration tests
- General integration tests
- Fuzzing (where applicable)
- Unit tests
- Flesh out examples
- Future considerations
- Format string literal replacement field format specifiers
- First-class function support
- User-defined types
- Compilation, JIT-compilation, transpilation, and static code analysis
- Preprocessor and macros
- Namespaces and including
- Nullish-coalescing operator (JavaScript's
??
), null-propagation (Rust's?
), optional chaining (JavaScript's.?
)
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.