In both languages the basic source character set includes every printable ASCII character except @
, $
and `
. I can understand not using grave accent because it's not always interpreted as a separate character and it also looks very similar to apostrophe. But is there a specific reason why @ and $ don't have any usage or did the language designers just run out of ideas? :)
Both Java and Python have the concept of a "string", C does not have the concept of a "string". C has character arrays which can come in "read only" or manipulatable. A character array is a sequence of contiguous characters with a unique sentinel character at the end (normally a NULL terminator '\0' ).
Only the underscore, the decimal digits, the unaccented upper- and lowercase letters, and universal character names are required to be allowed in C identifiers (the universal character names are new in C11).
Strings are actually one-dimensional array of characters terminated by a null character '\0'. Thus a null-terminated string contains the characters that comprise the string followed by a null.
Semicolon is a statement terminator which is purely used to identify the end of a statement.
I can't imagine what capacity they would fill. Perhaps using @ to signify pointers...
But $
and @
are very busy looking symbols, perhaps almost distracting, and if you throw them into the mix with an already diverse syntax, just because they're there, you might end up having a language that reads like a perl regex. Which is to say it doesn't read at all. :P
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With