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 -

ubuntu - Bash Script to Check That Files Are Being Created -

Php operator `break` doesn't stop while -