I've read #224 and I understand the reason why Symbols are not allowed as names of mutations (i.e. dev tools display mutation names to the user).
At the same time I don't get why (conceptually) actions and getters can't use symbols. For me the two are the only interface between Vuex and Vue components. I export their names as consts and use them in components. It is tedious to write getter/action name twice like in export const ACTIVE_THREAD = 'moduleName/activeThread'.
Technically there are places (like here) where names of actions and getters are converted to string. If I don't use namespaces it should not throw error. Is there a business reason why they have to be serialized?
Mateusz
There is a plan to visualize actions on devtools, also. https://github.com/vuejs/vue/projects/3
I'm not sure about getters. @yyx990803 may write his thoughts here.
I see your point here. One thing to notice is that ES 2015 specification calls the argument of Symbol constructor 'description' and developer.mozilla.org (which of course is not an official language specification) says:
A description of the symbol which can be used for debugging but not to access the symbol itself.
It seems reasonable for me to use ES6 symbols as names of actions and getters (and even mutations) with descriptions as an opt-in for debugging purpose.
In my opinion it solves the problem described here in even more elegant way than the "namespaced: true" module property (described in this place in vuex documentation).
To me this seems like a very natural use case for Symbol, where you'd just like to uniquely identify things.
And, to the serialization point, as @mzielinski-spartez suggests, description seems well supported in modern browsers.
Closing the issue due to inactivity. If we still need to discuss with the Symbol usage, it might be better to open a new issue since it will involve module system impact as well.
Most helpful comment
I see your point here. One thing to notice is that ES 2015 specification calls the argument of Symbol constructor 'description' and developer.mozilla.org (which of course is not an official language specification) says:
It seems reasonable for me to use ES6 symbols as names of actions and getters (and even mutations) with descriptions as an opt-in for debugging purpose.
In my opinion it solves the problem described here in even more elegant way than the "namespaced: true" module property (described in this place in vuex documentation).