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.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to