Re: Swift

From: Nick Patch <npatch_at_shutterstock.com>
Date: Wed, 4 Jun 2014 17:04:07 -0400

On Wed, Jun 4, 2014 at 7:45 AM, David Starner <prosfilaes_at_gmail.com> wrote:

> Could you not do that in Objective-C? If no, then it's a step forward
> for Apple, but the rest of us--Ada, C, C++, C#, Java, Python--have had
> this feature for years. 20 years in 2015 in the case of Ada.

Also, Perl has supported Unicode identifiers for 14 years. They were added
in Perl v5.6, released in March 2000.

The officially supported identifier characters are documented here:
https://metacpan.org/pod/perldata#Identifier-parsing

Here's a UTS #18 style regex to match a Perl identifier:
[ [ \p{word} && \p{XID_Start} ] || _ ][ \p{word} && \p{XID_Continue} ]*

And the equivalent Perl regex:
(?[ ( \p{word} & \p{XID_Start} ) | [_] ])(?[ \p{word} & \p{XID_Continue} ])*

This is basically the default XID identifier recommended in UAX #31 but
excluding any non-"word" characters and also allowing a leading underscore.

By the way, in the past I found that PHP even allows many different
whitespace characters in identifiers!

--
Nick Patch
@nickpatch

_______________________________________________
Unicode mailing list
Unicode_at_unicode.org
http://unicode.org/mailman/listinfo/unicode
Received on Wed Jun 04 2014 - 16:13:06 CDT

This archive was generated by hypermail 2.2.0 : Wed Jun 04 2014 - 16:13:06 CDT