Jule by examples

This article is a draft. It is not finished yet and might never be.

Created on 06/30/2025

There is a new programming language I found thanks to a comment under a video of Fireship : Jule.

Jule is a recent programming language similar to Go, but with immutable variables by default, better error handling, and native compile-time evaluation capabilities.

Currently the language lacks examples, so here are a few:

hello_world.jule
fn main() {
    println("Hello world!")
}

read_user_input.jule
use "std/bufio"
use "std/os"

fn readLine(mut scanner: &bufio::Scanner): str {
    scanner.Scan()!
    ret scanner.Text()
}

fn main() {
    mut scanner := bufio::Scanner.New(os::Stdin())

    print("Enter your name: ")
    name := readLine(scanner)
    println("So your name is '" + name + "'")
}

fizz_buzz.jule
fn main() {
  mut i := 1
  for i <= 16, i++ {
    if i % 15 == 0 {
      println("FizzBuzz")
    } else if i % 3 == 0 {
      println("Fizz")
    } else if i % 5 == 0 {
      println("Buzz")
    }
  }
}