Swift: Poll Best choice? I prefer [Double]() I prefer Array<Double>() I prefer Array<Element> and [Double]() Either. Both. Squirrel. pollcode.com free polls Share this:Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window) Related June 24, 2015 By erica Development, Swift 4 Comments Tweet this Post Dear Erica: Extend Safe Index?Dear Erica: Extend Safe Index?
4 Comments
I’m not sure of the difference between #3 (one-based) and #4. And you forgot
// composed in the comment, will require hours of tinkering in a playground, except playgrounds are broken in 7.0b2.
#3 uses Array style specifically for generics.
I personally like let doubleArray: [Double] = []
Squirrel (lovely reference) was my second choice, [Double]() my first.