Re: Re: Character range syntax ".." for character masks
| From: | Rowan Tommins | Date: | Sat, 09 Jul 2022 09:22:22 +0000 |
| Subject: | Re: Re: Character range syntax ".." for character masks | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-118233@lists.php.net to get a copy of this message | ||
On 9 July 2022 05:02:21 BST, mickmackusa <mickmackusa@gmail.com> wrote:
>Thanks for your reply, Kirill, but I am no way trying to introduce a new,
>general use operator for all encountered strings.
>
>I am purely focused on having the operator consistently implemented for all
>character masks.
I think the confusion here comes from your use of the word "operator" - in a technical
sense, this is not an operator in the language, which takes two values or expressions and produces a
new value. Rather, it's a convention used inside certain functions, to interpret a string
argument in a special way. I suppose you could argue that the result is a very simple embedded
language, like regular expressions, and then '..' would be an operator in that embedded
language; but it's probably not how most people would describe it.
As for proposing to add it in more places, it would be good to have a clear expression of why having
this facility in those functions would be useful. Every extra feature adds complexity, and is a
potential source of bugs both in its implementation and in code that users write which touches it. A
proposal needs to make a clear case of the gains that outweigh those costs.
Regards,
--
Rowan Tommins
[IMSoP]