*Lets start from scratch.* What if this syntax would be possible in Julia:
collection = [i for i in 1:10] @show collection[:first] @show collection[:middle] @show collection[:last] @show collection[:first] = -1 @show collection[:middle] = -1 @show collection[:my_own_name] = -1 > collection[1] = 1 > collection[5] = 5 > collection[10] = 10 > collection[1] = -1 = -1 > collection[5] = -1 = -1 > collection[7] = -1 = -1 As you see, it is decided *at compile time*, at what index of array I access And you can create special symbols for this smart accessing in julia itself! Fact: It is already possible, but it does not look so nice: @setindex ( collection[:first] = 5 ) Fact: You cannot do something like: FIRST = :first @setindex ( collection[FIRST] = 5 )
