I read The Swift Programming Language iBook . In the keywords section they are listed new . But in the Summary of the Grammar section, I did not find it.
The Swift Programming Language
new
Summary of the Grammar
What is new used in Swift for?
It seems to be deleted.
I tried let x = new Double[2] but in Xcode 7 it now throws an error
let x = new Double[2]
Playground execution failed: OSX.playground: 1: 9: error: use of unresolved identifier "new" let a = new [Double]
It seems that new can be used to create an array:
let x = new Double[2] x[0] = 3.1 x[1] = 4.2 println(x) // Output: [3.1, 4.2]
But this is only a theoretical interest. It is not documented and therefore should not be b.
Source: https://habr.com/ru/post/971240/More articles:Cannot access USB device in Windows Store application - c ++How to drag UIImageView along the Bezier path - cType mismatch for number in google chart API - javascriptReturn key method in UIInputViewController in iOS8? - ios8How to use LIMIT in spring in sql query? - javaHow to deal with: overriding the built-in type C ++ 'char16_t - c ++Using char16_t, char32_t etc. Without C ++ 11? - c ++Jquery ajax returns 404 not found - javascriptGNU Parallel - what work failed? - bashHow to check if java future is complete? - javaAll Articles