||= is much needed?

Ryan Florence rpflorence at gmail.com
Tue Jun 12 19:35:08 PDT 2012

Strawman looks great.

In CoffeeScript you've got both ||= and ?=.

||= is a falsey check, where ?= doesn't allow 0, '', etc.

While both are useful, if I had to pick one its ?=.

coffeescript example: http://bit.ly/OvKHZ8

Additionally, Ruby's ||= acts like CoffeeScript's ?=.

But if we're adding ?= because we're adding ?: maybe its okay to add ||= while we're at it? That said, I would hate to see ?= get derailed because ||= is "dumb".

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120612/55cf3874/attachment.html>

More information about the es-discuss mailing list