Skip to content
/ icelang Public

A simple and high-level programming language created for the purpose of learning about programming language design and implementation.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

ijchen/icelang

Repository files navigation

icelang logo

Test status Docs Crate

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.

Getting Started

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

To-do

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
    • Standard library features
  • Implementation
    • ice (binary)
      • REPL
      • File interpreter
    • lexer
      • TODO expand
    • parser
      • TODO expand
    • interpreter
      • TODO expand
  • Testing
    • Unit tests
      • General unit tests
      • Property-based tests (where applicable)
    • Integration tests
      • General integration tests
      • Fuzzing (where applicable)
  • 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 .?)

License

Licensed under either of

at your option.

Contribution

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.

About

A simple and high-level programming language created for the purpose of learning about programming language design and implementation.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Languages