3 ms·
They won't. The Go authors value simplicity. Many people dislike ternary syntax and find it hard to read. Go errs on the side of verbosity and readability. It i
by oofabz 11y ago
They won't. The Go authors value simplicity. Many people dislike ternary syntax and find it hard to read. Go errs on the side of verbosity and readability. It is sort of the opposite of Perl in that respect.
- fuddle 11y agoWhich is more simple, an if/else block or a terany operator? if/else: if i == 0 { return "foo" } else { return "bar" } terany: return i == 0 ? "foo" : "bar"