AdarshLang is a Hinglish-inspired language with a comedic twist. Below is a summary of its features:
badlo x = 10; aur expressionsdikhao(x);sahi_hai_be, jhuthagar ... warna with chained warna agarjabtak (while), ginnati (for), ke_liye (value in items) (foreach)chuno (expr) { case ... warna_case ... }baaki varargs, anonymous kaam (...) { ... }push, pop, length) aur dictionaries/`dhacha` records with rakho/nikalopakdo { ... } chhoddo (err) { ... } and chhoddo(expr); throwslao "mera_module.aak"; for reuseabs, floor, join, split), functional (map, filter, reduce), random_number, current_time aur zyadaHere’s an example using all features:
dhacha Vyakti { naam, umar }
kaam banakar(naam, umar = 18) {
wapas Vyakti { naam: naam, umar: umar };
}
badlo hero = banakar("Adarsh", 24);
badlo nums = [1, 2, 3];
ginnati (badlo i = 0; i < length(nums); i = i + 1) {
dikhao(nums[i]);
}
ke_liye (badlo value in nums) {
dikhao(value);
}
pakdo {
chhoddo("demo error");
} chhoddo (err) {
dikhao(err);
}
badlo doubled = map(kaam (value) { wapas value * 2; }, nums);
dikhao(doubled);
Try pasting the snippet above into the editor, then click "Run Code".