Pow Expressions - not worth the juice?
user1234
user1234 at 12.de
Tue Feb 3 18:55:42 UTC 2026
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.
More information about the Digitalmars-d
mailing list