3 ms·
It could be: foo ?! { bar } But, now we’re potentially confusing the “negation” and the “exclamation” meanings the bang symbol usually tries to communicate.
by chairhairair 2y ago
It could be:
foo ?! { bar }
But, now we’re potentially confusing the “negation” and the “exclamation” meanings the bang symbol usually tries to communicate.
- nonethewiser 2y agoI tend to agree that ? looks like "if then" when what we really want is some sort of coalescing, or "if not then". foo ?? { bar } foo ?/ { bar } foo ?: { bar } foo ?> { bar } foo ||> { bar } Im not sure I like the idea at all though. It seems like a hack around a pretty explicit design choice. Although I do tend to agree the error handling boilerplate is kind of annoying.