<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Jan 1, 2016, at 4:44 PM, John Joyce via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><blockquote type="cite" class=""><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">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</pre></blockquote><div class="">I know this is an old thread already, but this sure would be one of the major breakout pieces of functionality.</div><div class="">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.</div><div class="">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.</div><div class="">It'd boost the scripting use of Swift tremendously and seal the deal as a server side language.</div></div></div></blockquote><br class=""></div><div>Totally agreed. switch on a string with a bunch of regexes being matched should turn into a parallel state machine, just like a lexer :-)</div><div><br class=""></div><div>-Chris</div><br class=""></body></html>