Untitled attachment
https://assets.chaos.social/media_attachments/files/110/536/488/329/861/933/original/bb87184c93f4345e.png
The ternary operator is a very handy notation to simply abbreviate if else constructs. And often it’s seen nested - one, two or three times. The compiler has no problems with such code. But we, as human beings, reach the limits.
I wrote a short article about it:
https://woodbytes.me/en/blog/don-t-use-nested-ternary-operators-in-swift
076萌SNS is a social network, courtesy of 076. It runs on GNU social, version 2.0.2-beta0, available under the GNU Affero General Public License.
All 076萌SNS content and data are available under the Creative Commons Attribution 3.0 license.