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

This is so arbitrary. State what you want, make it explicit.

    if ( list_of_names ) { ... }
doesn't make any sense at all. For one thing, `list_of_names` should only be allowed to be `null` in exceptional cases; disallowing it removes a whole class of errors.

Second, imagine you have two handy operators / functions `not` and `is_empty`, then the above becomes either

    if ( not is_empty list_of_names ) { ... }
or

    if ( is_empty list_of_names ) { ... }
    
as the case may be. In which universe is that too long for a load-bearing program that people depend on?


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

Search: