![]() Var biff: Int? = nil // "Optional Int", can be an Int or nil Kotlin val foo = 42 // constant ![]() Declare Variables Swift let foo = 42 // constant (inferred type Int) Here’s a handy cheat-sheet for anyone who is familiar with one language, and just needs to look up the syntax for doing the same thing in the other language. ![]() Fortunately Swift and Kotlin are very similar in a lot of ways, many of the paradigms are the same, just with different syntax. My background is primarily iOS development, though I’ve been dabbling in the Android world in recent years.
0 Comments
Leave a Reply. |