groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <>
Subject [jira] [Commented] (GROOVY-8312) Deprecate useless features of unicode sequences
Date Sat, 09 Sep 2017 07:38:00 GMT


Paul King commented on GROOVY-8312:

I think those three items are mostly but perhaps not all useless.
I think it is safe to remove (3). I can see no reason at all for the multiple u prefix support
but I'll check if anything shows up in the git history just to be sure.
I think (2) is just an artifact of the way parsing used to be done and doesn't offer any value.
I am less clear about (1). On the one hand I think file encoding is fairly well known and
most tools support it, but I think the idea was that someone limited to US-ASCII or similar
could still write whatever scripts they wanted, e.g. for this class definition:
class MathConstants {
  static π = 3.14
I could use a US-ASCII encoded file such as follows:
println MathConstants.\u03c0
I'll see if I can find anything related in git history or old Jiras.

> Deprecate useless features of unicode sequences
> -----------------------------------------------
>                 Key: GROOVY-8312
>                 URL:
>             Project: Groovy
>          Issue Type: Improvement
>    Affects Versions: 2.6.0-alpha-1
>            Reporter: Daniel Sun
>            Assignee: Daniel Sun
>             Fix For: 2.6.0-alpha-2
> 1) Declaring identifier with unicode sequences , e.g.  `def \u4e00\u9fa5 =
> 123`
> 2) All source code is written in unicode sequence, e.g. `\u0064\u0065\u0066
> \u0061 \u003d \u0031\u0032\u0033`, the corresponding readable code is `def a
> = 123` 
> 3) Unicode sequences like `\uuuuuuuuuu9fa5` is allowed in Groovy

This message was sent by Atlassian JIRA

View raw message