Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Unicode and escape sequences in property names. #56

Closed
jordanbtucker opened this issue Jul 27, 2014 · 2 comments
Closed

Support for Unicode and escape sequences in property names. #56

jordanbtucker opened this issue Jul 27, 2014 · 2 comments

Comments

@jordanbtucker
Copy link
Member

Are there any ideas on how to support Unicode and their escape sequences in identifiers? What are the options, and what are the pros and cons of those options?

It seems the biggest hurdle is that there is no standard way to determine what Unicode category a code point belongs to. For example, an identifier can start with $, _, or any character in the five Letter categories or in the Number, Letter category. That's 17196 different characters, all spread across the Unicode code point list.

Here are some ideas on perhaps how to solve this:

  • Require a dependency that provides support for testing Unicode categories.
  • Bake in support for it yourself. I've already done some prototyping and benchmarking.
  • Consume Unicode escape sequences and forego testing them against appropriate Unicode classes, willfully violating the ES5 spec.
  • Something very obvious I haven't thought of yet.

I think it's worth discussing the costs and benefits of implementing this support. What do you think?

@aseemk
Copy link
Member

aseemk commented Jul 29, 2014

These are great thoughts. Issue #1 already exists for the same thing you're talking about, I think. Want to move your comment there and close this one as a dupe?

@jordanbtucker
Copy link
Member Author

Moved to #1. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants