iGodric iGodric - 7 months ago 42
Swift Question

For what is the new keyword?

I read the

The Swift Programming Language
iBook.
In the keywords section they listed
new
. But in the section
Summary of the Grammar
I didn't found it.

For what is
new
used in Swift?

Answer

It seems to have been removed.

I tried let x = new Double[2] but in Xcode 7 it now throws an error

Playground execution failed: OSX.playground:1:9: error: use of unresolved identifier 'new' let a = new [Double]

Comments