Go to file
Michael Lohr f9fae71d4e
Kontinuierliche Integration verbessert
2021-09-11 20:18:52 +02:00
.github/workflows Kontinuierliche Integration verbessert 2021-09-11 20:18:52 +02:00
examples Update remaining occurences of old translation 2021-09-11 20:02:54 +02:00
rost_proc_macro Change translation of trait to a better fitting name 2021-09-11 19:37:32 +02:00
.gitignore Commit initial. 2021-09-09 19:51:22 +02:00
Cargo.toml Übersetzung der Instruktionen 2021-09-11 18:21:47 +02:00
LIZENZ Lizenz wurde hinzugefügt 2021-09-11 18:29:45 +02:00
README.md Update remaining occurences of old translation 2021-09-11 20:02:54 +02:00
logo.jpg Übersetzung der Instruktionen 2021-09-11 18:21:47 +02:00

README.md

rost

Rust German Logo

Aren't you müde from writing Rust programs in English? Do you like saying "scheiße" a lot? Would you like to try something different, in an exotic and funny-sounding language? Would you want to bring some German touch to your programs?

rost (German for Rust) is here to save your day, as it allows you to write Rust programs in German, using German keywords, German function names, German idioms.

You're don't feel at ease using only German words? Don't worry! German 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 Rost:

struct and impl (aka Konvention und Umsetzung)

rost::rost! {
    benutze std::collections::Wörterbuch als Wöbu;

    eigenschaft SchlüsselWert {
        funktion schreibe(&selbst, schlsl: Zeichenkette, wert: Zeichenkette);
        funktion lese(&selbst, schlsl: Zeichenkette) -> Ergebnis<Möglichkeit<&Zeichenkette>, Zeichenkette>;
    }

    statisch änd WÖRTERBUCH: Möglichkeit<Wöbu<Zeichenkette, Zeichenkette>> = Nichts;

    struktur Konkret;

    umstz SchlüsselWert für Konkret {

        funktion schreibe(&selbst, schlsl: Zeichenkette, wert: Zeichenkette) {
            lass wöbu = gefährlich {
                WÖRTERBUCH.hole_oder_füge_ein_mit(Standard::standard)
            };
            wöbu.einfügen(schlsl, wert);
        }

        funktion lese(&selbst, schlsl: Zeichenkette) -> Ergebnis<Möglichkeit<&Zeichenkette>, Zeichenkette> {
            wenn lass Etwas(wöbu) = gefährlich { WÖRTERBUCH.als_ref() } {
                Gut(wöbu.hole(&schlsl))
            } anderenfalls {
                Fehler("Holt das Wörterbuch".hinein())
            }
        }
    }
}

Other examples

See the examples to get a rough sense of the whole syntax. Gut so!

but why would you do dis?

Mitwirken

First of all, vielen Dank for considering participating to this joke, the German government will thank you later! Feel free to throw in a few identifiers here and there, and open a pull-request against the hauptzweig (German for main) branch. The initial translation was made by Shemnei and michidk.

Die Lizenzbestimmungen

WTFPL.

Image attributions:

  • "Brezel und Filzhut zum Oktoberfest" by Tim Reckmann | a59.de is licensed under CC BY 2.0
  • "Lederhose" is licensed under CC BY-NC-SA 4.0