On 22/11/2013 19:32, Brian Anderson wrote:
On 11/21/2013 08:53 PM, Patrick Walton wrote:
There are several issues in the backwards-compatible milestone related to Unicode identifiers:

#4928: XID_Start/XID_Continue might not be correct
#2253: Do NKFC normalization in lexer

Given the extreme lack of use of Unicode identifiers and the fact that we have much more pressing issues for 1.0, I propose putting support for identifiers that don't match /^(?:[A-Za-z][A-Za-z0-9]*|_[A-Za-z0-9]+)$/ behind a feature gate.

Thoughts?

This is ok by me. Let's keep looking for rough corners like this to scale back or remove.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev
I agree with the sentiments expressed by Patrick and Brian.

But Patrick, are you also suggesting that in the default case outside the feature gate, we would only allow underscore solely as a leading character, and not as an embedded one? Or were you just whipping up a quick regexp on the fly and left out the potential for a non-leading underscore?

% js
js> var r =  /^(?:[A-Za-z][A-Za-z0-9]*|_[A-Za-z0-9]+)$/;
js> r.exec("a3b")
["a3b"]
js> r.exec("_a3b")
["_a3b"]
js> r.exec("a_b")
null
js> r.exec("_a_b")
null
js>


Cheers,
-Felix

--
irc: pnkfelix on irc.mozilla.org
email: {fklock, pnkfelix}@mozilla.com

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to