Open msurkovsky opened 9 years ago
I think that it can be combined in a way that 'token_name' is preferred if it exists. If it does not exist then << is used. (The same mechanism as for external/internal token_name, where external is preferred). Not only because of backward-comparability, but sometimes << can be unusable for token name.
It would be better if types which are used on places overloads operator
<<
instead of usingtoken_name
function for string representation of tokens. Currently there is usedtoken_name
method which has to be specified for such types. But when types withtoken_name
method and other types which usually provide their string representation through<<
operator have to be combined drawbacks come to light. It would be useful to have one unique way for providing string representation of a type. There is a question whethertoken_name
method should be preserved and a new solution will be a combination of both attempts or it should be completely deleted?