Getting StartedTR / EN
Bilingual Syntax: English & Turkish Parity
Complete keyword equivalence table and side-by-side runnable English & Turkish HADID examples.
6 min readUpdated: v0.8.0-rc Reference
One AST, Two First-Class Languages
HADID maps Turkish and English keywords directly in the lexer to the same canonical tokens and AST nodes. Every language feature and builtin is tested in both languages across interpreter and C17 native execution.
| Concept | English | Turkish |
|---|---|---|
| Variables / Constants | let / var, const | degisken, sabit |
| Functions / Return | fn / func, return | fonksiyon / islev, dondur |
| Conditionals | if, else | eger, degilse |
| Loops | while, for, break, continue | iken, dongu, kir, devam |
| Types | string, bool, void, struct, enum | metin, mantik, bos, yapi, sayim |
| Matching & Booleans | match, true, false | eslestir, dogru, yanlis |
| Modules | import / using, as | aktar / kullan, olarak |
| Core Builtins | print, assert, length, list_append | yaz, dogrula, uzunluk, liste_ekle |
Side-by-Side Runnable Parity
hadid · EN
struct Order { code: string, amount: i32}fn add_vat(o: Order): i32 { if (o.amount <= 0) { return 0; } return o.amount + (o.amount * 20) / 100;}let o1 = Order { code: "DH-101", amount: 500 };print(o1.code);print(add_vat(o1));hadid · TR
yapi Siparis { kod: metin, tutar: i32}fonksiyon kdv_ekle(s: Siparis): i32 { eger (s.tutar <= 0) { dondur 0; } dondur s.tutar + (s.tutar * 20) / 100;}degisken s1 = Siparis { kod: "DH-101", tutar: 500 };yaz(s1.kod);yaz(kdv_ekle(s1));