DEV Community

Cover image for πŸš€ Getting Started with Razen Lang: A Simple, Fast & Friendly Language(10 Min Read!)
Prathmesh barot
Prathmesh barot

Posted on

πŸš€ Getting Started with Razen Lang: A Simple, Fast & Friendly Language(10 Min Read!)

πŸš€ Getting Started with Razen Lang: A Simple, Fast & Friendly Language

Razen Lang is a beginner-friendly, minimal programming language designed to be expressive, easy to read, and quick to use. In this post, we’ll explore everything you need to get started β€” syntax, variables, usage, and how to install it properly for your system.

🌟 This post is a complete guide with examples β€” a must-read if you’re new to Razen!


πŸ“¦ Installation (Custom Per OS)

Razen Lang supports multiple operating systems, but there's no single universal install command.

πŸ‘‰ Visit the official GitHub repository to find the right command for your OS:

πŸ”— Razen GitHub Repo (Follow & Star!)

You’ll find install guides, examples, and updates there.


πŸ“„ File Structure: Start With type

Every Razen file starts by declaring its type:

type script;
Enter fullscreen mode Exit fullscreen mode

You can also use type web; or type cli; depending on your use case.


🧠 Variable Declarations

Razen uses different keywords for different data types, making code self-explanatory and clean.

πŸ”’ Numbers – let

let age = 16;
let price = 19.99;
Enter fullscreen mode Exit fullscreen mode

πŸ”€ Strings – take

take name = "Razen";
take city = "Ahmedabad";
Enter fullscreen mode Exit fullscreen mode

βœ… Booleans – hold

hold is_active = true;
hold is_admin = false;
Enter fullscreen mode Exit fullscreen mode

❓ Any Type – put

put data = "anything";
Enter fullscreen mode Exit fullscreen mode

βž— Math Operations

Use math-specific keywords to perform operations, without let:

diff result = 10 - 3;
sum total = 5 + 9;
prod mult = 3 * 4;
div avg = 10 / 2;
mod remain = 10 % 3;
Enter fullscreen mode Exit fullscreen mode

βœ… Always end statements with ; β€” it's optional, but highly recommended to avoid errors.


πŸ” Logic & Conditions

hold is_logged = true;

if is_logged {
  show "Welcome back!";
} else {
  show "Please login.";
}
Enter fullscreen mode Exit fullscreen mode

Use is for comparisons:

if age is 18 {
  show "You're 18!";
}
Enter fullscreen mode Exit fullscreen mode

Use not to negate:

if not is_logged {
  show "Access denied.";
}
Enter fullscreen mode Exit fullscreen mode

πŸ“ Strings

take msg = "Hello, Razen!";
len msg;            # Get length
slice msg 0 5;      # Get substring
concat msg " Dev!"; # Join text
Enter fullscreen mode Exit fullscreen mode

πŸ“š Lists & Arrays

list users = ["Jay", "Neha", "Sam"];
append users "Nina";
remove users "Jay";

arr marks = [90, 85, 88]; # Fixed size
Enter fullscreen mode Exit fullscreen mode

πŸ—ΊοΈ Dictionaries / Maps

map student = {
  "name": "Aman",
  "age": 17
};

key student;     # Access keys
value student;   # Access values
Enter fullscreen mode Exit fullscreen mode

⏰ Date & Time

current;
year;
month;
day;
hour;
minute;
second;
Enter fullscreen mode Exit fullscreen mode

🧾 Input / Output

show "Enter your name:";
read name;
show name;
Enter fullscreen mode Exit fullscreen mode

πŸ” Loops & Functions

while age < 18 {
  show "Too young!";
}

fun greet {
  show "Hello!";
  return;
}
Enter fullscreen mode Exit fullscreen mode

🧠 Special Values

true;
false;
null;
Enter fullscreen mode Exit fullscreen mode

πŸ’Ύ Storage

store data = "Saved";
box temp = 42;
ref alias = name;
Enter fullscreen mode Exit fullscreen mode

πŸ§ͺ Full Example

type script;

take name = "Razen";
let age = 16;

if age is 16 {
  show "You’re 16!";
}

sum total = 10 + 5;
diff difference = 20 - 7;

show total;
show difference;
Enter fullscreen mode Exit fullscreen mode

🎯 Final Notes

βœ… Use ; at the end of lines β€” not required, but recommended

βœ… Go to GitHub to install for your OS

βœ… Star and follow the repo to support Razen!


If you liked this deep-dive, drop a follow and star the repo β€” let’s build an awesome Razen community together! πŸš€πŸ’¬

Top comments (0)