Skip to content
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

Unary ++ operator #11

Open
pxeger opened this issue Apr 19, 2022 · 1 comment
Open

Unary ++ operator #11

pxeger opened this issue Apr 19, 2022 · 1 comment

Comments

@pxeger
Copy link
Owner

pxeger commented Apr 19, 2022

An expression x++ would be equivalent to (x := x + 1).

  • It would have to be postfix only, to prevent ambiguity with +(+(x))
  • For maximum inconsistency with C, it should return the postincremented value
@chunkybanana
Copy link

Cool, but gonna be very hard to do without rewriting the parser. (afaik) Python has no postfix operators normally.

Also, how are you gonna distinguish it from a+ +b?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants