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

Considering the semantics of the method (getting a user object or identifier), I don't think that's an issue. And a falsy OR also allows for using good (and falsy) null objects instead of nulls in object-oriented languages, an ability which would be lost (and lead to more reliance on NULLs, a behavior which should not be promoted) through a stricter selective operator.

The inability to trivially use null objects in conditionals is, in fact, one of the things I dislike in Ruby (where only `false` and `nil` are falsy).



Can you exemplify that inability? What is it you can't trivially do?




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

Search: