Pow Expressions - not worth the juice?

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Tue Feb 3 19:00:59 UTC 2026


On 04/02/2026 7:55 AM, user1234 wrote:
> On Tuesday, 3 February 2026 at 18:34:01 UTC, Richard (Rikki) Andrew 
> Cattermole wrote:
>> On 04/02/2026 6:46 AM, Walter Bright wrote:
>>> On 2/3/2026 7:11 AM, jmh530 wrote:
>>>> where the basically the `"op"` can be anything so long as it is 
>>>> delimited in a form like "%op%"
>>>
>>> In D that would be like:
>>> ```d
>>> x.op(y)
>>> ```
>>
>> "op" there isn't meant to be a valid identifier.
>>
>> It would translate to: ``a.opBinary!"op"(b)`` or ``a.opUnary!"op"``
>>
>> I don't like this delineated approach, but there are tables for 
>> Unicode math binary/unary op's around.
>>
>> Main issue is a character can be both.
>>
>> However given D is not a mathematical language, its introduction is 
>> questionable at best.
> 
> I see indeed a lot of potential disapoinment.
> 
> people wants to be able to write `a ∩ b`. But `∩` is not an regulatory 
> identifier character (I remember you've recently worked on that 
> problem). The R lang solution would not even work. `a "∩" b` or 
> something... just like the workaround in R.

Identifiers have nothing to do with this, its a mathematical operator 
just like ``|`` is.

Different set of tables (in this case hard coded into parser).



More information about the Digitalmars-d mailing list