THE Young Niggas, COMPILED.

The YN Language

A fast, strictly typed, dynamically parsed language for the next generation of engineers. Built entirely on C. Runs like Python.

Introduction

Welcome to the official documentation for the YN Programming Language. YN brings Python-style interpolations, strict typing, and an entirely new urban-inspired syntax format down to a fast native C compiler.

Installation

For Windows users, we provide a standalone GUI installer that natively packs the compiler into a single click.

1. Get the Installer

Download the yn_install.exe standalone application.

2. Run Native Compiler

Launch the YN Language GUI Installer. It can securely download and link GCC MinGW for you.

3. Restart Terminal

Once deployed to C:\yn, restart your terminal and you're done.

bash
yn script.yn

Hello World

Outputting text in YN is street-certified. Use hear_my_mans() to print anything to the console.

yn
hear_my_mans("Hello, World!");

Variables

YN implements strict typing using the hold.this. prefix format. You must declare the exact type of variables when you spawn them.

yn
hold.this.string my_name = "Young N Multi-File Edition";
hold.this.int age = 21;
hold.this.boolean isStudent = true;

Unassigned Variables & Reassignment

You can also declare a variable without jumping immediately to assigning it a value. It will be safely initialized with default null states based on its type behind the scenes.

yn
// Declare it raw
hold.this.string name;
hold.this.int counter;

// Re-assign it later down the block
name = "Dane";
counter = 42;

hear_my_mans(f"{name} has {counter} points.");

Data Types

The streets run on strict data structures. YN natively supports four primary data types:

"A"

string

Used for text up to the default string size limit. Initialize with double quotes: hold.this.string phrase = "what up";

42

int

Standard integer blocks. Declare them raw: hold.this.int count = 100;

3.1

float

Precision decimal numbers. hold.this.float price = 99.99;

boolean

Straight facts only: true or false. hold.this.boolean cap = false;

Output & Strings

We support Python-style localized f-string interpolations natively into print statements.

yn
hold.this.string city = "NY";
hold.this.int age = 21;
hear_my_mans(f"My age is {age} and I live in {city}");

Formatting Floats

When dealing with float types in f-strings, YN formats them to 2 decimal places by default for clean currency or percentage outputs.

yn
hold.this.float bill = 45.6789;
// Outputs: "The tab is 45.68"
hear_my_mans(f"The tab is {bill}");

Loops (laps)

Running laps is fundamental. YN simplifies the classic iteration protocol into clean, expressive blocks using laps.

yn
laps(i in range(0,3)){
    hear_my_mans(f"Testing compilation block {i}");
}