Change the `class` or `type` nomenclatura by something more agnostic
Summary
Change the class
terminology in C++ or the type
terminology in python by another term that will not have conflict with reserved word.
Motivation
The use of class
in order to characterize some quiddity category has conflicts with the reserved word in particular with the Python wrapper or with the JavaScript clients. For the Python wrapper, it was chosen to use type
that could also has conflicts with typing libraries. In JavaScript clients, the use of the term clientID
was chosen.
The developper of these two differents tools (Python wrapper and JavaScript clients) seem to not have a discussion about this problem and the multiplication of this terms will lead to more confusion.
It is time for a great refactoring and we need to statuate for a term that will fit for all pieces around Switcher.
Proposal
As I am the JavaScript developer on the project I naturally purpose the classId
term.
In order to be more open-minded, I could find inspiration with the web protocols: the use of metadata
key could be a big clue as the class
is a kind of a meta-information on any quiddity.
Impact on already existing code
This is a big and tricky search and replace
for every projects around Switcher. As we are in a big transition step this the great time for this kind of change!
Roadmap
-
Find a consensus on the new word class
,type
,kind
,metadata
,classId
-
Refactor the C++ codebase (and test it) -
Refactor the Python codebase (and test it) -
Refactor the JavaScript codebase (and test it) -
Test all that stuff together