[Pitch #2] Regex Literals

The problem with #regex("...") is that it looks like a string literal argument to a magic literal, when in fact the quotes are part of the delimiter itself. For example, you wouldn't be able to do:

let pattern = "[abc]+"
let regex = #regex(pattern)

which would likely be unexpected.

4 Likes