The existing C syntax defines a character constant as:
character is constant:
' c- char -sequence '
L' c-char -sequence '
Your question boils down to why this cannot be determined instead:
character is constant:
' c- char
L' c- char
Well, that could - in the sense that it would still be a consistent grammar of parsing, and you could still express single-character constants. What you couldn't do was express multi-character constants (like 'ab' ) - they are legal, but they have a value defined by the implementation.
I suspect that the true reason is simply aesthetics. For example, in theory there is also no reason why brackets are needed for conditionally expressing an if .
source share