1

Hello World

Your first Ifá-Lang program

Welcome to Ifá-Lang!

Every programming journey starts with a simple program that displays "Hello, World!" on the screen. In Ifá-Lang, we use the Irosu domain for console output (or Fmt/Log in English).

The Code

Here's your first Ifá-Lang program:

hello.ifa
// hello.ifa - Your first Ifá program
Irosu.fo("Kaabo, Ifá!");
// hello.ifa - Your first Ifá program
// 'Irosu' can be 'Fmt' or 'Log'
Fmt.println("Hello, Ifá!");

Let's break it down:

💡 Bilingual Aliases

Ifá-Lang supports both Yoruba and English. Use the toggle buttons above the code blocks to switch between languages!

Running Your Program

Save the code to a file called hello.ifa, then run:

ifa run hello.ifa

Output:

Kaabo, Ifá!

🎮 Try It Yourself

Click the button below to open this code in the playground:

▶ Open in Playground

More Output Methods

Irosu has several output methods:

Output Demo
// Print with newline
Irosu.fo("Line 1");
Irosu.fo("Line 2");

// Print without newline
Irosu.so("Hello, ");
Irosu.so("World!");
Irosu.fo("");  // Add newline

// Print an error message (to stderr)
Irosu.kigbe("Something went wrong!");
// Print with newline
Fmt.println("Line 1");
Fmt.println("Line 2");

// Print without newline
Fmt.print("Hello, ");
Fmt.print("World!");
Fmt.println("");  // Add newline

// Print an error message (to stderr)
Fmt.error("Something went wrong!");

What You Learned