TIL you can do x = f() ?: g() instead of x = f() ? f() : g(). The ?: thingy is called "Elvis operator". Available in many languages, not just C.
x = f() ?: g()
x = f() ? f() : g()
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!