0 votes
in D Programming by
Why Not Support Regular Expression Literals With The /foo/g Syntax?

1 Answer

0 votes
by

There are two reasons:

The /foo/g syntax would make it impossible to separate the lexer from the parser, as / is the divide token.

There are already 3 string types; adding the regex literals would add 3 more. This would proliferate through much of the compiler, debugger info, and library, and is not worth it.

Related questions

+1 vote
asked Mar 5, 2021 in D Programming by SakshiSharma
0 votes
asked Oct 6, 2023 in JavaScript by GeorgeBell
...