𝕊𝕚𝕤𝕪𝕡𝕙𝕖𝕒𝕟@programming.dev to Programmer Humor@programming.dev · 3 years agoi++programming.devimagemessage-square32linkfedilinkarrow-up1325arrow-down13
arrow-up1322arrow-down1imagei++programming.dev𝕊𝕚𝕤𝕪𝕡𝕙𝕖𝕒𝕟@programming.dev to Programmer Humor@programming.dev · 3 years agomessage-square32linkfedilink
minus-squareKnusper@feddit.delinkfedilinkarrow-up1·3 years agoIn the languages I know, i-=-1 or x=3 are not expressions, but rather statements, so they do not evaluate to a value. So, this would be a compiler error: a = (x=3)
minus-squaremfz@kbin.sociallinkfedilinkarrow-up2·3 years agoWell, not all languages allow for fun programming :)
minus-squareKnusper@feddit.delinkfedilinkarrow-up1·3 years agoSounds like the opposite of fun to me, to have those as expressions…
In the languages I know,
i-=-1orx=3are not expressions, but rather statements, so they do not evaluate to a value.So, this would be a compiler error:
a = (x=3)Well, not all languages allow for fun programming :)
Sounds like the opposite of fun to me, to have those as expressions…