Deep nesting vs early returns
Jacob Carlborg
doob at me.com
Tue Oct 2 19:09:35 UTC 2018
On 2018-10-02 20:14, Andrei Alexandrescu wrote:
> Kate Gregory makes a good argument on something I've often commented in
> code reviews: https://youtu.be/n0Ak6xtVXno?t=2682
Swift has the "guard" statement to help with early returns (and unwrap
optionals).
https://thatthinginswift.com/guard-statement-swift/
https://docs.swift.org/swift-book/ReferenceManual/Statements.html#ID524
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list