我是Swift初學者。我發現聲明陣列中迅速如下:Array或Array <Element> in Swift
public struct Array<Element> : CollectionType, MutableCollectionType, _DestructorSafeContainer {}
然而,延伸的陣列如下:
Extension Array: _Reflectable {}
爲什麼標識符是不同?
Array<Element> // what does the <Element> mean? is Array<Element> a complete identifier?
我想了解「<>」,謝謝!
https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Generics.html – jtbandes
http://www.apeth.com/swiftBook/ch04.html#_generics – matt