Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What binary infix operator can't the + in += be replaced by? I can't think of any. /,*,-,%,^,||,&&,|,& all work.

I guess = is taken by another symbol, but that does assignment all on its own.



They're describing "+=" as a single operator, not a combination. "-=" is a different single operator, as is "/=" and and all the others. The first character and the "=" are inseparable, they just have all the combinations defined as independent operators. They're comparing it to a language where the first part (which can be multiple characters!) is actually separate from "=".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: