Ruby 2.3 &. operator and Swift can do something like this pseudocode:
if let city = article?.author?.address?.city?.ToLower() { // city present }
if let city = article? .author? .address? .city? .ToLower() { // city present }
(Be aware of subtle gotcha in Scala of var and val, really prefer Rust/Go/Swift keywords.)
Ruby 2.3 &. operator and Swift can do something like this pseudocode:
Too long?: All are improvements over pyramids of doom.(Be aware of subtle gotcha in Scala of var and val, really prefer Rust/Go/Swift keywords.)