Dragon Logo

Ye Olde Dragon

programming languages & automata II

About

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.

Key Features

Static & Strong Typing

Manifest Typing

Structs and Classes

Various types of Loops

String Interpolation

.yod File Extension

Code Examples

Hello World
 proclaim("Hello, dragons!!!!");
Variable Bindings
thine gold_cups: int = 8;

fact pi: float = 3.14159;

thine maybe: string? = zilch string;
While Loops
thine dragons: int = 10;
whilst (dragons > 0) {
    proclaim(“There are still dragons left in the cafĂ©â€);
    dragons--;
}
For Loops
thine coins: [string] = [“gold”, “silver”, “bronze”];
fortill (coin in coins) {
    proclaim(“We have a ${coin} coin today!”);
}
Conditionals
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
”);
}
Function Calls
don printNum(num: int) -> int {
    proclaim(num);
}

printNum(num: 5);
Class Declaration
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}.");
Factorial
don factorial(num: int) -> int {
    perchance ((num == 0) || (num == 1)) {
        return 1;
    }
    return num * factorial(num: num - 1);
}

proclaim(factorial(5));

Meet the Devs