Sincerely, I do not understand what Apple are doing with Swift!!!
It is the only programming language that is incapable to run the code below:
var x: Int = 2
var y: Double = 2.0
var z: Double = y / x
The expected value of z is 1.0.
Any language can make this calculation, except Swift.
This imposes a big difficulty where it should not be.
Int and Double must be freely convertible one to another, at least using casting.
You can not do any thing below:
var k: Double
k = Double(x)
k = Double(x.value)
k = (Double) x
k = (Double) x.value
Serious???
I am very dissapointed with Swift because of it.
It had everything to be a good language to program but it is not because this bug.