According to the Apple documentation, this is the proper way to create an empty array of a specific object type in Swift 4:
var output_list = [Output]()
In the wild I have seen slightly different array declarations. I believe the following is functionally identical to the previous declaration:
var output_list: [Output] = []
However I'm fairly confident that the following two declaration methods have nuanced differences from the above:
var output_list: [Output]?
var output_list: [Output]!
What are the effective differences to the above listed methods of declaring an array as as instance variable in a Swift 4 class?
EDIT: Okay I understand that for the last two examples the variable declaration is an optional, not a generic array declaration. What about this:
var output_list: [Output?]
Is this effectively the same as var output_list = [Output]()
?
Also, is var output_list = [Output]()
=== var output_list: [Output] = []
?