On 12/12/2021 22:01, Larry Garfield wrote:
If the list of operators is expanded by the engine, yes.  The point is that IF 
it were decided in the future to allow user-space defined operators, that would 
be considerably easier with a separate keyword.


A real-life example of this approach would be PostgreSQL, where a user-defined operator can be (almost) any combination of + - * / < > = ~ ! @ # % ^ & | ` ?

It would be *possible* to have an open-ended naming scheme for these, such as "function __atSign_leftAngle" for the operator @> (which conventionally means "contains" in PostgreSQL) but it would be rather awkward compared to "operator &>" or "#[Operator('&>')]".


Regards,

--
Rowan Tommins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to