Pow Expressions - not worth the juice?
user1234
user1234 at 12.de
Tue Feb 3 16:39:59 UTC 2026
On Tuesday, 3 February 2026 at 15:51:05 UTC, jmh530 wrote:
> On Tuesday, 3 February 2026 at 15:23:09 UTC, user1234 wrote:
>> [snip]
>>> [...]
>>
>> So you just avoid the call-expression syntax so that you can
>> put spaces between the operands and the operator ? I'm not
>> sure this solves any problem. Maybe you can provide
>> enlightning examples ? The one from your link is not
>> convincing.
>
> I was sketching out what a D version of the example from that
> link, not that I would want to do that in D. We have UFCS.
>
> The idea is that you can put anything in within the "op" of
> "%op%", so it's on the user to decide how they want to make use
> of it (or not). R uses "%*%" for matrix multiplication. That's
> more ergonomic than `A.matmul(B)`.
Thanks for your reply but that confirms what I initially thought.
Personally I see a little problem with the surrouding percent
symbols (i.e not a progress compared to call syntax, they are
equally unperfect) but essentially that's not a criticism about R
designers choices. Just not fan you see.
More information about the Digitalmars-d
mailing list