Boolean shortcuts
François REMY
fremycompany_pub at yahoo.fr
Wed Jan 4 05:27:07 PST 2012
I agree that code block is a complex feature that is (almost) never used and
that has many quirks.
If ES6 could remove it, I would not be upset at all. If it's here to stay,
we should at least have an introductory keyword like "eval { ... }" and
allow "var x = eval { ... }".
BTW, I think the reason of your inconsistency is a bug : eval("{}") should
return undefined, as in IE9. It seems that node.js has a special case for
{}, probably to avoid a common mistake. Or there's a bug in the parser, I
don't know.
More information about the es-discuss
mailing list