ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Talk:Operator associativity - Wikipedia, the free encyclopedia

Talk:Operator associativity

From Wikipedia, the free encyclopedia

[edit] Untrue statement

The following statement was removed by user 83.21.237.8 with the reason as "not true".

Associativity normally applies only to binary operators (operators with two arguments), written in infix notation, such as +, -, *, /.

What exactly are you disagreeing with?

  • If you disagree with the word binary, then perhaps you (or someone else) could add a section to the article on the associativity of operators with three arguments (like the ?: operator).
  • If you are disagreeing with the word infix, then know that associativity doesn't apply to polish notation (where all operators are prefix operators), or reverse polish notation (where all operators are postfix operators), because neither polish notation, or reverse polish notation is ambiguous.
  • Perhaps you were thinking that unary operators also have an associativity property. If you indeed have a definition for the associativity of a unary operators, perhaps you (or someone else) could add a section to the article to explain that and why it's useful. I would not consider it useful, because I don't think there is any ambiguity with unary operators that cannot be resolved by operator precedence. If you allow a unary operator to be used in both prefix and postfix notation, then yes, that could be ambiguous; e.g. the ++ operator in C: the expression ++x++ could be (++x)++ or ++(x++), but these are not ambiguous in practice because they both mean the same thing. Ambiguity introduced by the interaction between binary and unary operators (e.g. is -1+2 actually (-1)+2 or -(1+2)) is actually resolved by operator precedence and not associativity (unary minus has higher precedence than binary plus and minus).
  • If you are disagreeing with the narrow list of examples (+, -, *, /), then know that that was not intended to be a complete list.

--Egriffin (talk) 22:43, 28 March 2008 (UTC)


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -