Hinglish · meri bhasha

Code in your
own language.

A Hinglish-flavoured programming language with a full compiler pipeline — write badlo, dikhao, agar and run it instantly in your browser.

Playground
/ Ctrl + Enter to run
Output

    

Examples

Click any example to load it into the playground, then hit Run.

Quick Tutorial

AdarshLang is a Hinglish-inspired programming language. Here's everything it can do.

📦 Basics

  • Variables: badlo x = 10;
  • Printing: dikhao(x);
  • Booleans: sahi_hai_be / jhuth
  • Null: khali
  • Comments: # yeh comment hai

Operators

  • Arithmetic: + - * / % **
  • Comparison: == != < > <= >=
  • Logical: && || !
  • Compound: += -= *= /= %=

🔀 Control Flow

  • If/Else: agar (...) { } warna { }
  • While: jabtak (y > 0) { }
  • For: ginnati (...; ...; ...) { }
  • For-each: ke_liye (badlo i in list)
  • Switch: chuno (expr) { case ... }
  • Break/Continue: bas; / aage_badho;

🛠️ Functions

  • Define: kaam add(a, b) { wapas a+b; }
  • Defaults: kaam g(n, m = "hi") { }
  • Varargs: kaam total(baaki nums) { }
  • Anonymous: kaam (x) { wapas x*2; }

📚 Collections

  • Lists: [1,2,3] + push, pop, sort, slice
  • Dicts: {"key": "value"} + keys, values
  • Structs: dhacha Vyakti { naam, umar };

🧮 Built-in Functions

  • Math: abs floor ceil round_val min_val max_val
  • Strings: upper lower join split trim replace find
  • Type: prakar shabdme sankhya
  • Iteration: range contains
  • Functional: map filter reduce

🛡️ Errors & Modules

  • Try/Catch: pakdo { } chhoddo (err) { }
  • Throw: chhoddo("error message");
  • Import: lao "module.aak";