Skip to content

Discussion about ambuigity in postifx unary and binary operators #989

Answered by gregmarr
MiroPalmu asked this question in Q&A
Discussion options

You must be logged in to vote

Maybe I don't understand something but with this quote from design note: Postfix operators:

cases like x**y mean the same as x* * y since they can't mean anything else, which is convenient so we can still write things like a*b and a*2 conveniently with the obvious meaning.

I find it interesting that A*A and A**A does not compile. Bug?

@hsutter I think that this points out that https://github.com/hsutter/cppfront/wiki/Design-note:-Postfix-operators

as a convenience, cases like x**y mean the same as x* * y since they can't mean anything else,

was not updated after https://github.com/hsutter/cppfront/wiki/Design-note:-Postfix-unary-operators-vs-binary-operators was created. Here is fur…

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@MiroPalmu
Comment options

@DyXel
Comment options

Comment options

You must be logged in to vote
3 replies
@MiroPalmu
Comment options

@gregmarr
Comment options

@AbhinavK00
Comment options

Answer selected by MiroPalmu
Comment options

You must be logged in to vote
1 reply
@MiroPalmu
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants