Functions are generally useful for using in a formula, variables are generally useful for using as a generic value.
Both constant functions and globals will inline (functions only if they follow the inline rules as outlined in the JassHelper Manual), so there's no performance difference.
The difference is that in constant variables, the user can change the value(say you posted your spell and someone else is using it) but not put in a formula. For example, if I type 5*level in a constant variable then there will be a compile error saying that level isn't initialized.
But in constant functions, you pass level as a parameter, so you can do 5*level. Ok, so someone else is using your spell, he wants to make the spell deal damage depending on the hero's kills. So he changes the formula to 5*level*kills instead.
Where to use what?
You can use functions when you need to get a value which depends on another value. Like damage, which depends on the level, so that you can pass level as a parameter.
You can use variables when that field will probably be constant and never change, like an animation path or the order string of the dummy spell.
Ghan has said he has fixed this. Monovertex please confirm this fix. This was only a problem with people that had signatures in the upper levels like not the special members but the respected members.