Clean up state or print out debug information just before leaving the scope by defining the defer statement can improve development a lot.

Swift 4 is almost upon us, and I thought I would explore one of its features that I haven’t had the opportunity to that much: KeyPaths. There’s a lot of interesting nuance in here that I previously didn’t realize existed which I’d love to share.