programming languages & automata II
Ye Olde Dragon is a scripting tongue of great renown, born of the noble bloodlines of Pythonđ, JavaScriptđ, and Swiftâthe latter swift as a winged wyrm in flight. With the wisdom of its forebears and the might of modern design, this statically-typed, object-oriented spellbook seeketh to unite the strongest magicks of these three enchanted realms. Crafted for clarity and strength, its syntax be plain to read and swift to wield, granting both novice scribes and seasoned code-mages the power to conjure great workings with ease. Whether thou desire to craft humble tools or summon great digital beasts, Ye Olde Dragon equipeth thee well. With power, clarity, and wisdom of its ancestors, this language standeth as a beacon for all who dare to wield the arcane arts of code. Come, adventurer. Take up thine keyboard. The Dragon awaiteth.
proclaim("Hello, dragons!!!!");
thine gold_cups: int = 8;
fact pi: float = 3.14159;
thine maybe: string? = zilch string;
thine dragons: int = 10;
whilst (dragons > 0) {
proclaim(âThere are still dragons left in the cafĂ©â);
dragons--;
}
thine coins: [string] = [âgoldâ, âsilverâ, âbronzeâ];
fortill (coin in coins) {
proclaim(âWe have a ${coin} coin today!â);
}
perchance caféIsOpen == shall {
proclaim(âIt is open!);
} else perchance caféIsOpen == shant {
proclaim(âIt is closed!);
} else {
proclaim(âLowkey, we donât know what happened hereâŠâ);
}
don printNum(num: int) -> int {
proclaim(num);
}
printNum(num: 5);
matter Car {
init (color: string, model: string, year: int) {
ye.color = color;
ye.model = model;
ye.year = year;
}
}
thine car: Car = Car(color: "blue", model: "ford", year: 2025);
proclaim("This car is a ${car.model} in the color ${car.color}.");
don factorial(num: int) -> int {
perchance ((num == 0) || (num == 1)) {
return 1;
}
return num * factorial(num: num - 1);
}
proclaim(factorial(5));