Hacker News new | past | comments | ask | show | jobs | submit login

Assignments in conditions can sometimes be useful and lend clarity, if it makes sense for the assignment to "fail".

For the rough, rough example the below is probably not too clever.

`if (!(my_socket=new_socket(inet_addr)) { fail(); }`




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

Search: