π 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;
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;
π€ Strings β take
take name = "Razen"; take city = "Ahmedabad";
β
Booleans β hold
hold is_active = true; hold is_admin = false;
β Any Type β put
put data = "anything";
β 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;
β 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."; }
Use is
for comparisons:
if age is 18 { show "You're 18!"; }
Use not
to negate:
if not is_logged { show "Access denied."; }
π Strings
take msg = "Hello, Razen!"; len msg; # Get length slice msg 0 5; # Get substring concat msg " Dev!"; # Join text
π Lists & Arrays
list users = ["Jay", "Neha", "Sam"]; append users "Nina"; remove users "Jay"; arr marks = [90, 85, 88]; # Fixed size
πΊοΈ Dictionaries / Maps
map student = { "name": "Aman", "age": 17 }; key student; # Access keys value student; # Access values
β° Date & Time
current; year; month; day; hour; minute; second;
π§Ύ Input / Output
show "Enter your name:"; read name; show name;
π Loops & Functions
while age < 18 { show "Too young!"; } fun greet { show "Hello!"; return; }
π§ Special Values
true; false; null;
πΎ Storage
store data = "Saved"; box temp = 42; ref alias = name;
π§ͺ 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;
π― 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)