3 ms·
Indent with two spaces for code formatting.
by fainpul 1y ago
Indent with two spaces for code formatting.
- yohbho 1y agofk 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 1y 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 1y agoI would use "sei" instead of "lass" for "let" to be more in line with notation in mathematical proofs.