4 ms·
fk lese(&selbst, schlsl: Zeichenkette) -> Ergebnis<Möglichkeit<&Zeichenkette>, Zeichenkette> { wenn lass Etwas(wöbu) = gefährlich { WÖRTERBUCH.als_r
by yohbho 11mo ago
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())
}
}
isn't the idea behind programming "languages", that they are sentences readable to both humans and the compiler?
This absolutely is not readable to me. But woerterbuch and schluessel should of course not be abbreviated, for legibility.
- ahartmetz 11mo agoIf 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.
- b3orn 11mo agoI would use "sei" instead of "lass" for "let" to be more in line with notation in mathematical proofs.