Is it possible to make a.b style keywords in cpp2? #1060
Unanswered
YagaoDirac
asked this question in
Q&A
Replies: 1 comment 3 replies
-
It's definitely possible, but this is the kind of thing that would typically arise later after the syntax has become complex and we're trying to evolve something in a crowded grammar area. Right now the syntax is quite simple so I'm not sure we have cases where this would arise. Did you have some examples in mind? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As programming languages are more advanced, they probably need more keywords.
a.b style for keywords allows almost infinite amount of keywords while they are absolutely impossible to conflict with any user defined var name.
While a.b style makes use of automatic completion, and can gather keywords for similar usages in the same "namespace".
I just saw people talked about the syntax for loop. Generally, if we can have more keywords, we can provide more feature for the lang. And also, if we can use keywords, it's very likely to be a better design than only with symbols. Symbols will never get any support from automatic comletion.
Do you guys still remember the joke like: auto(){()auto(()){()}.(); It's not a real code. But if you don't know what is this, you will never get any help from bing or google, or even the docs doesn't help.
Beta Was this translation helpful? Give feedback.
All reactions