[swift-evolution] Empower String type with regular expression
Tino Heth
2th at gmx.de
Wed Feb 3 04:18:41 CST 2016
Of course it is possible to create a regex from a string at runtime — but when you do so at compile time you
- can check the syntax
- compile the expression down to machine code for better performance (there could be a significant advantage).
Sidenote:
In 2013, when I got bored by Objective-C and didn't know about the secret work on Swift, I started playing with llvm and tried to build a regex-compiler to get familiar with the infrastructure.
I had to stop halfway because of "real" work, but I'm sure native regex support would make Swift even better for server-side programming and scripting.
More information about the swift-evolution
mailing list