[Pitch] Regex Syntax

We have a first-class, powerful, and versatile solution for parsing and pattern-matching in native Swift. That’s a separate proposal (actually multiple proposals, some of which have already been pitched).

We still want to have regexes, because:

  1. programs need to be able to leverage user-specified parsers and pattern matchers, not only those fixed in their source code, and those need to support a string representation. For the purposes of interoperability with existing tools, it is advantageous for regexes to be one such representation.

  2. they are the lingua franca of such programs today, and that familiarity confers substantial advantages.

That’s this proposal.

12 Likes