Brandon, That's a bug in v8. The "module" identifier is only supposed to be reserved in a very specific context. The required context is not valid syntax today, so it's safe to say that no one's using it yet.
Bugs in v8 are rare enough that this really confused me as well. I thought for sure something had slipped into the spec. Here's the report: http://code.google.com/p/v8/issues/detail?id=1957 On Fri, Feb 17, 2012 at 15:29, Brandon Benvie <[email protected]> wrote: > So just to bring this back to the original discussion spark: the new mostly > non-functional --harmony-module flag in V8 does do one thing really well and > that's throw this: > > node.js:77 > var module = new Module('eval'); > ^^^^^^ > SyntaxError: Unexpected token module > > > Obviously this is bleeding edge and bugs and broken stuff etc. etc. Even > being a daily reader of es-discuss and looking through the spec I couldn't > say what new things are reserved in what contexts in ES6. So suffice to say > I don't there's too much of an issue as long as 70% of the code that exists > for Node is not in fact going to be invalid Syntax overnight someday. > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
