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

++ and -- are allowed as:

- single line statements always in postfix form

- for loops

- exception for the prefix form in for loops with C++ iterators due to performance reasons

Clever C code has its place in hackatons, not in code that needs to survive a few project generations.



> - exception for the prefix form in for loops with C++ iterators due to performance reasons

That is a reasonable thing to allow, but I personally find that particular use much more confusing and finicky than using !! to coerce to boolean.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: