SE-0354 (Second Review): Regex Literals

Ah sorry. This comment in pitch thread was in my mind.

As the counter argument for #regex("..."), he pointed out that the ("...") part behaves differently compared to other functions, since it does not allow expressions like #regex(x) or even #regex(condition ? "abc" : "def").

However, proposed @const parameters can support such behavior. Therefore, if they are introduced, #regex("...") signature is less unfamiliar, because the behavior is very similar to @const parameters.

I also understand #regex("") alternative has other problems as written in the proposal. I suggest nothing here, but I was just curious about how the SE-0359 relates to this proposal.

1 Like