osx - Dynamic variable names in Swift -



osx - Dynamic variable names in Swift -

i refer variable in swift using combination of string , variable. in php following:

$i = 1 ${'variable' . $i} = 'test'

which same as

$variable1 = 'test'

how done in swift?

you can't. unlike php, swift not interpreted language. of version 1.1 doesn't back upwards dynamism (which cost beingness safe , performant).

osx swift

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -