Are you tired of writing Rust programs in English? Do you find yourself craving to shout out Norwegian expressions while coding? Looking for a new, exotic-sounding language that will bring some Scandinavian flair to your Rust projects?
korrosjon (Norwegian for Rust) is here to save your day, as it allows you to write Rust programs entirely in Norwegian, complete with Norwegian keywords, function names, and idioms.
Worried about being stuck with only Norwegian words, especially if you’re from a place where Norwegian isn’t the only lingua franca?
No worries! Norwegian Rust is fully compatible with English Rust, so you can mix both languages as you please.
Below is an example showcasing what is possible with korrosjon:
korrosjon::korrosjon! {
ekstern eske korrosjon;
bruk std::collections::Ordbok som Ordbok;
egenskap Nøkkelverdi {
funksjon skriv(&selv, nøkkel: Streng, verdi: Streng);
funksjon les(&selv, nøkkel: Streng) -> Resultat<Kanskje<&Streng>, Streng>;
}
statisk foranderlig ORDBOK: Kanskje<Ordbok<Streng, Streng>> = Ingenting;
struktur Konkret;
implementer Nøkkelverdi for Konkret {
funksjon skriv(&selv, nøkkel: Streng, verdi: Streng) {
la ordbok = utrygt {
ORDBOK.ta_eller_sett_inn_med(Standard::standard)
};
ordbok.sett_inn(nøkkel, verdi);
}
funksjon les(&selv, nøkkel: Streng) -> Resultat<Kanskje<&Streng>, Streng> {
hvis la Noen(ordbok) = utrygt { ORDBOK.som_ref() } {
Bra(ordbok.les(&nøkkel))
} ellers {
Prob("henting av ordbok".til())
}
}
}
}
See the examples to get a rough sense of the whole syntax. Det er ikke verre en det
First of all, tusen takk for considering participating to this completely serious project. Feel free to throw in a few identifiers
here and there, and open a pull-request against the hoved
(Norwegian for
main
) branch.
We would love support for Norwegian Nynorsk as an optional feature in the crate.
- French: rouille
- 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
- Croatian: hrđa
- Persian: zangar (زنگار)
- Malagasy: arafesina
- Latin: ferrugo
- All of the above: unirust