fk 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()) } }
fk 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()) } }
I don't like the non-Germanic ref here in als_ref is not Germanic enough. als_ver (from Verweis) would be nicer.
I read it as als_referenz, which arguably makes sense!
For sure it's valid German but for maximum fun it's nice to have it be as Germanic as possible and avoid words that share roots with the standard English programming terms.
As a non-Bavarian German, I'm offended by the German = Bavarian stereotype! (jk, it's just mildly annoying sometimes and this is meant to be silly)
Almost perfect. I'm missing the Schwabacher typeface rendering.
Indent with two spaces for code formatting.
This absolutely is not readable to me. But woerterbuch and schluessel should of course not be abbreviated, for legibility.
If German was seriously used in programming languages, I'd hope for some better and shorter terms. Some here might be intentionally too literal translations anyway. "Let" is from mathematics, it's called "Sei" in German. "Sei x = 5". "Anderenfalls" could be "sonst". "Zeichenkette" is just too long and would require some thinking or a historical accident to find a shorter term.
Ready surprisingly nice to me anyway.
I would use "sei" instead of "lass" for "let" to be more in line with notation in mathematical proofs.