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

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

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