An Operator Newcomer or a Cheater?
emmtrix Tech Posts: Work & Fun with C++ Standard
Category: Anecdote
There was a day when a requirement engineer needed to generate a CSV-file based on the requirements from the C++ standard. A basic question appeared straight away: What delimiter can be used? Any delimiter that is not used by the language came into play. But this was not something obvious and the engineer was aware of it, so they went on a search. They came up with the character “@”. It did not take much to realize that this character, too, appeared in the standard (see Table 11 – Relationship between operator and function call notation).
An operator “@”! This cannot be serious! Both a unary and a binary operator! Share your mind and help the engineer, because for them this was something new.
Task: Is the engineer allowed to use the character “@” as a delimiter or not? Remember that any character that is not used by the language syntax comes into play.
___
Read on if you want to know the solution to the tasks…
Yes, the engineer is allowed to use the character “@” as a CSV-delimiter.
Looking at table 11 might be misleading at first. However, character “@” is not an operator. Character “@” is an operator-placeholder! As such, it is used only within the standard. It is not part of the language syntax and hence it can be used as a delimiter for our engineer’s purpose.