DEV Community

Discussion on: Properties in Swift: How to Avoid Shooting Yourself in the Foot

Collapse
 
dimpiax profile image
Dmytro Pylypenko

Hello Preslav,

better to use lazy in using case of class or struct:

lazy var foo: Foo = { ... }()
  1. remove colon in after URLSession.