Hi!
I’m very interested in the Swift programming language, but unfortunately I’m not able to get access to Mac devices to start learning Swift. I was happy when I found Silver which allowed me to do Swift programming on Visual Studio, but after several learning hours, I find that Silver and Swift have more differences than I expected. For instance, here is an example in “The Swift Programming Language”:
for index in 1...5 {
println("\(index) times 5 is \(index * 5)")
}
but it doesn’t work in Silver. I have to add something:
for index in 1...5 {
println("\(index) times 5 is \(Int32(index) * 5)")
}
And here’s another example:
let defaultColorName = "red"
var userDefinedColorName: String? // defaults to nil
var colorNameToUse = userDefinedColorName ?? defaultColorName
It doesn’t work either. After referring to documentation, I think that’s because String is a reference type in Silver, but a value type in Swift.
Is Silver suitable for Swift newbies? Or if only I had a Mac to learn Swift?
Thank you for your help! :]