fddl Programming Language

Lexer Screenshot Lexer Tests Screenshot REPL Screenshot Parsing 'hello, world'

Overview

fddl is a small, experimental programming language, built in Rust, designed to explore language implementation concepts. It's a blend of ideas from various languages but remains unique, with its own syntax and quirks.

For years, I’ve tried to learn various programming languages, and while I could master the basics, the real-world projects often eluded me. Rust, however, clicked for me, and fddl was born out of this journey.

I like aspects of many programming languages, but I didn’t fully enjoy any of them, which made it difficult to commit to one. So, like many others, I decided to create my own hobby programming language.

Features

Getting Started

To clone the repo:

git clone https://git.fddl.dev/fddl/fddl.git

To run the REPL:

cargo run

To run a fddl script:

cargo run path/to/script.fddl

Examples

Your basic "hello, world":


func main() {
    print(`hello, world in fddl`);
}
        

Defining a function inside a module, squaring a number:

##! This is a sample module

module math {

    ### Computes the square of a number
    func square(x) => x ^ 2;
}

define $number := 5;
print(`The square of $number is ${math.square($number)}`);
        

(At least for now.)

Notes and Next Steps

Running the Project

Make sure your project compiles and the tests pass:

cargo build
cargo test

Contact

Git repo