Aren't you umorni from writing Rust programs in English? Do you like saying "razlaz" a lot? Would you like to try something different, in an exotic and funny-sounding language? Would you want to bring some Croatian touch to your programs?
hrđa (Croatian for Rust) is here to save your day, as it allows you to write Rust programs in Croatian, using Croatian keywords, Croatian function names, Croatian idioms.
This has been designed to be used as the official programming language to develop the future Croatian sovereign software.
If you're from the Croatian or any other governement with Croatian as an official language: I will be awaiting your donations on liberapay.
Don't worry! Croatian Rust is fully compatible with English Rust, so you can mix both at your convenience.
Here's an example of what can be achieved with Hrđa:
hrđa::hrđa! {
koristi std::collections::KartaSažetaka kao Rječnik;
svojstvo KljučVrijednost {
fn napiši(&suština, ključ: ZnakovniNiz, valeur: ZnakovniNiz);
fn dohvati(&suština, ključ: ZnakovniNiz) -> Rezultat<Neobavezno<&ZnakovniNiz>, ZnakovniNiz>;
}
nepokretno izmjenjiv RJECNIK: Neobavezno<Rječnik<ZnakovniNiz, ZnakovniNiz>> = Nijedan;
građa GPKrk;
ispuna KljučVrijednost za GPKrk {
fn napiši(&suština, ključ: ZnakovniNiz, valeur: ZnakovniNiz) {
dopusti rjecnik = opasno {
RJECNIK.dohvati_ili_ubaci_uz(Podrazumijevano::podrazumijevano)
};
rjecnik.ubaci(ključ, valeur);
}
fn dohvati(&suština, ključ: ZnakovniNiz) -> Rezultat<Neobavezno<&ZnakovniNiz>, ZnakovniNiz> {
ako dopusti Neki(rjecnik) = opasno { RJECNIK.ko_upuć() } {
URedu(rjecnik.dohvati(&ključ))
} inače {
Kiks("dohvati rjecnik".pretvori())
}
}
}
}
#[dopusti(izvor_nedostupan)]
fn sekundarni() {
panika!("o ne"); // for the usual Croatian experience
razlaz!("gasi to"); // a student party broken up
racija!("nemoj, Milane"); // time to give a cut of the rakija
}
See the examples to get a rough sense of the whole syntax.
- Dutch: roest
- German: rost
- Polish: rdza
- Italian: ruggine
- Russian: Ржавый
- Esperanto: rustteksto
- Hindi: zung
- Hungarian: rozsda
- Chinese: xiu (锈)
- Spanish: rustico
- Korean: Nok (녹)
- Finnish: ruoste
- Arabic: sada
- Turkish: pas
- Vietnamese: gỉ
- Japanese: sabi (錆)
- Danish: rust?
- Marathi: gan̄ja
- Romanian: rugină
- Czech: rez
- Ukrainian: irzha
- Bulgarian: ryzhda
- Slovak: hrdza
- Catalan: rovell
- Corsican: rughjina
- Indonesian: karat
- Lithuanian: rūdys
- Greek: skouriasmeno
- Thai: sanim (สนิม)
- Swiss: roeschti
- Swedish: rost