> What you are suggesting indeed fails. I think what Ashley was talking about was having constant strings that point to your functions.
>
> Then, if you changed the name of a function, the only place you would have to update the value would be in the corresponding constant, which could be referenced elsewhere in your code. You would only have to do this for functions that were going to be called in multiple places.
>
> However, now that I think about it, I don't see why we should be prevented from naming functions with constant global strings...it's not like they are going to change.
>
> Ashley ???
>
Actually, it seems to be due to the implémentation of functions themselves, where each "on function" issue a totally different call (when you call a function, it will not test each function's name then execute, it will only trigger directly said function), that however needs a direct name for the function.
But...a constant global string won't change. Right?
Still, I can see the complications of this, most of which would be edittime issues:
1. What if you change a var from constant to non-constant? What do you do for functions 'named' by that var? Invalidate them? Delete them?
2. What if you create a function called "Foo" and name another function after a constant with the value "Foo"...is the editor supposed to sort all that out?
I guess that's the thing about a lot of 'simple' requests: implementing them is rarely as easy as it seems.