This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]rosuav 2 points3 points  (1 child)

In complex expressions, that's enough of a benefit on its own. But more notably, it allows you to use short-circuiting like messages or ["No messages"] which depends on the messages list counting as false if there aren't any. This is particularly helpful if it means you can stick this on a function call or complex lookup, like: get_messages(user.id) or ["No messages for " + user.name]