Post

Replies

Boosts

Views

Activity

Comment on Presentation single with code
the () is at the end of the closure, to tell the closure to execute and return result, which initialise the var. If you write only var controller: NSWindowController? = { … } the var is a closure, not NSWindowController. With () at the end, closure executes and returns the expected NSWindowController.
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21