[swift-evolution] Empower String type with regular expression

Patrick R. Gili gili.patrick.r at gili-labs.com
Sun Feb 7 18:36:58 CST 2016


Hi Brent,

I think we should go all the way. The Perl6 community has done a bang up job: developers don't need to worry about writing tokenizers anymore, more intuitive and reduced number of meta characters, increased reusability and readability, and well throughout support for Unicode.

I like the new grammar feature, but I'm still reading about this and playing with it. I wonder if it isn't something we can consider later.

Cheers,
-Patrick

Sent from my iPad

On Feb 7, 2016, at 5:13 PM, Brent Royal-Gordon <brent at architechies.com> wrote:

>> Further, I highly recommend checking out Perl 6’s regular expressions.  They are a community that has had an obsessive passion for regular expressions, and in Perl 6 they were given the chance to reinvent the wheel based on what they learned.  What they came up with is very powerful, and pretty good all around.
> 
> As someone who learned to argue about language design on perl6-language, you have my interest. :^)
> 
> How far do you want to go here? In the small, Perl 6 redesigned regex syntax to remove certain syntactic hacks and make more common operations more accessible; in the medium, they introduced extensibility and reusability with named rules; in the large, they made grammars of named rules a first-class language feature; and in the very large, they turned the parsing of Perl itself into a Perl grammar you could subclass and modify for metaprogramming. #1 and #4 are very different propositions.
> 
> -- 
> Brent Royal-Gordon
> Architechies
> 


More information about the swift-evolution mailing list