Variables
| Yoruba |
English |
Description |
ayanmo |
let |
Variable declaration |
àyànm?´ |
let |
Variable (with diacritics) |
// Yoruba
ayanmo oruko = "Ifá";
ayanmo iye = 42;
// English
let name = "Ifá";
let count = 42;
Data Types
| Type |
Yoruba Literal |
English Literal |
Example |
| Integer |
— |
— |
42, -17 |
| Float |
— |
— |
3.14, -0.5 |
| String |
— |
— |
"Hello" |
| Boolean |
otito, iro |
true, false |
otito |
| Null |
ohunkohun |
null |
ohunkohun |
| List |
— |
— |
[1, 2, 3] |
Control Flow
Conditionals
| Yoruba |
English |
Description |
ti |
if |
If condition |
bib?k? ti |
else if |
Else if |
bib?k? |
else |
Else |
// Yoruba
ti (x > 10) {
Irosu.fo("Large");
} bib?k? ti (x > 5) {
Irosu.fo("Medium");
} bib?k? {
Irosu.fo("Small");
}
// English
if (x > 10) {
Irosu.println("Large");
} else if (x > 5) {
Irosu.println("Medium");
} else {
Irosu.println("Small");
}
Loops
| Yoruba |
English |
Description |
nigba |
while |
While loop |
fun ... ninu |
for ... in |
For-each loop |
// While loop (Yoruba)
ayanmo i = 0;
nigba (i < 5) {
Irosu.fo(i);
ayanmo i = i + 1;
}
// For loop (Yoruba)
ayanmo awon = [1, 2, 3];
fun x ninu awon {
Irosu.fo(x);
}
// English equivalents
let i = 0;
while (i < 5) {
Irosu.println(i);
let i = i + 1;
}
let items = [1, 2, 3];
for x in items {
Irosu.println(x);
}
Functions
| Yoruba |
English |
Description |
ese |
fn |
Function definition |
pada |
return |
Return value |
// Yoruba
ese greet(oruko) {
pada "Kaabo, " + oruko + "!";
}
// English
fn greet(name) {
return "Hello, " + name + "!";
}
// Call
ayanmo result = greet("World");
Operators
| Category |
Operators |
Example |
| Arithmetic |
+ - * / % |
a + b |
| Comparison |
== != < > <= >= |
a == b |
| Logical |
ati/and, tabi/or, kii ?e/not |
a ati b |
| String |
+ (concat) |
"a" + "b" |
Domain Calls
Call domain methods with dot notation:
// Pattern: Domain.method(args...)
Irosu.fo("Hello"); // Console output
Irete.sha256("data"); // Crypto hash
Odi.read("file.txt"); // File I/O
Iwori.now(); // Timestamp
Osa.sum([1, 2, 3]); // Parallel sum
Comments
// Single line comment
/* Multi-line
comment */
Special Statements
| Yoruba |
English |
Description |
?b? |
sacrifice |
Resource cleanup (RAII) |
àj??e |
co-op |
Reactive relationship |
ìwàp?`l?´ |
gentle |
Graceful error handling |