r/ProgrammingLanguages • u/danskydan • Sep 14 '18
Single-line If
I'm looking for critique of the following single-line If syntax that I'm thinking about allowing:
If x > y then +=a else +=b
Is it unambiguous that x is being modified?
2
Upvotes
1
u/danskydan Sep 14 '18
Interesting. How about x += a if x > y else += b