Ye Olde Dragon is a statically-typed, object-oriented scripting language whose name was inspired by its parent languages, Python🐉, Javascript 📜, and Swift (like a dragon 🏃♂️💨). We intend to bring together the best of all three worlds to create a highly effective and readable language that combines our favorite features and strengths from each. Ye Olde Dragon’s easily understandable syntax makes it an accessible language for beginners and experienced programmers alike, due to its powerful and versatile functionalities.
Ye Olde Dragon is brought to you by Raihana Zahra, Lauren Campbell, Cecilia Zaragoza, and Z Anderson.
- .yod File Extension
- Static and strong typing
- Manifest typing
- Ternary Conditional Statement
- Truthy/Falsy types
- Switch statements without fall-through
Name | Type |
---|---|
YeOldeDragon | JavaScript |
string | String |
int | Number |
float | Number |
boolean | Boolean |
zilch | null, undefined |
Structure | JavaScript Syntax | dragonCafe Syntax |
---|---|---|
Lists | [a, b, c, d] |
[dragon, dragin, dragen] |
Objects | { 'a': 'b', 'c': 'd' } |
{ "dragon": "a", "drugon": "b" } |
Operator | Symbol | Type Compliance |
---|---|---|
Optional Chaining | ?. |
Object |
Optional Type | ? |
All |
Ternary Operator | ?? |
All |
Addition | + |
Int, Float, String |
Subtraction | - |
Int, Float |
Multiplication | * |
Int, Float, String, List |
Division | / |
Int, Float |
Increment | ++ |
Int, Float |
Decrement | -- |
Int, Float |
Exponentiation | ^ |
Int, Float |
Modulus | % |
Int, Float |
Greater Than | > |
Int, Float |
Greater Than or Equal To | >= |
Int, Float |
Less Than | < |
Int, Float |
Less Than or Equal To | <= |
Int, Float |
Equal To | == |
All |
NOT Equal To | != |
All |
Boolean OR | ` | |
Boolean AND | && |
Boolean |
Boolean NOT | ! |
Boolean, List |
Attributor | . |
Object |
List Indexer | [] |
List |
Assignment | = |
All |
Here are some examples, Ye Olde Dragon on the left, JavaScript on the right.
YeOldeDragon | JavaScript |
---|---|
~ This is a comment |
// This is a comment |
~ This is a multiline comment That takes up multiple lines |
/* This is a multiline comment That takes up multiple lines */ |
YeOldeDragon | JavaScript |
---|---|
proclaim("Hello, dragons!!!!"); |
console.log("Hello, world"); |
YeOldeDragon | JavaScript |
---|---|
thine gold_cups: int = 8; |
let goldCups = 8; |
fact pi: float = 3.14159; |
const pi = 3.14159; |
YeOldeDragon | JavaScript |
---|---|
thine beverages: int = 5; |
let beverages = 5; |
thine beveragesButAString: string = toString(beverages); |
let beveragesButAString = String(beverages); |
YeOldeDragon | JavaScript |
---|---|
|
|
|
|
YeOldeDragon | JavaScript |
---|---|
|
|