> On Jan 1, 2016, at 4:44 PM, John Joyce via swift-evolution > <[email protected]> wrote: >> It is also probably worth burning first-class language support for regexes. >> This would allow specifying variable captures inline in the pattern, would >> allow flexible syntax for defining regexes, support powerful extensions to >> the base regex model (e.g. Perl 6 style), and would provide better >> compile-time checking and error recovery for mistakes. >> >> -Chris > I know this is an old thread already, but this sure would be one of the major > breakout pieces of functionality. > If Swift had native regular expressions, without all the noise you see in the > Objective-C API that exposes ICU regular expressions, the adoption rate would > be huge. > If they were *truly* native, as in somebody sat down and built an NFA (or one > of the fancier approaches that mixes with DFA) state machine, Swift's > best-in-class Unicode support would and could result in amazing things. > It'd boost the scripting use of Swift tremendously and seal the deal as a > server side language.
Totally agreed. switch on a string with a bunch of regexes being matched should turn into a parallel state machine, just like a lexer :-) -Chris
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
