-
Notifications
You must be signed in to change notification settings - Fork 261
[SUGGESTION] Support (some) C++ alternative tokens #304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think logical operators |
I think having the bitwise operators spelled out would eliminate more ambiguity than spelling out the logical operators. For example: a&&b; //what if a and b are not bool? This is the kind of context cpp2 tries to eliminate ig? That would also reserve |
In Cpp2, they should be keywords, not alternative tokens. Then there's no chance you can use it weirdly, like in Cpp1 (e.g. |
How would we write |
I did notice that I'm not proposing banning using operators. So you choose to write it however you like. Including using |
There's some mentions of an |
I've opened #328 for the lack of diagnostics. |
I prefer writing (
and
,or
) to (&&
,||
). Currently, they're treated as identifiers. Socppfront
emits an error if used C++1-correctly (x = y and z;
, 3 identifiers in a row is ill-formed), or emits bad C++1 code (x = and;
).https://github.com/hsutter/cppfront/wiki/Design-note%3A-Postfix-unary-operators-vs-binary-operators talks about "alternative tokens". It seems they were supported at some point before this repository was published.
Will your feature suggestion eliminate X% of security vulnerabilities of a given kind in current C++ code? No (my guess).
Will your feature suggestion automate or eliminate X% of current C++ guidance literature? No (my guess).
Describe alternatives you've considered.
_and
, with no portable way to name them from C++1).The text was updated successfully, but these errors were encountered: