From 2aef02836ee0aa1f778f68d139d07b42be02d93e Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 22 Aug 2020 18:05:42 -0400 Subject: =?UTF-8?q?Note=20=E2=8C=8A=E2=88=98=C3=B7=20versus=20|=20argument?= =?UTF-8?q?=20order=20confusion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/problems.html | 2 +- problems.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/problems.html b/docs/problems.html index 761117a1..9469d9dd 100644 --- a/docs/problems.html +++ b/docs/problems.html @@ -26,7 +26,7 @@

Hard to search part of an array or in a different order

This includes index-of-last, and searching starting at a particular index, when the desired result indices are to the array to be seached before it is modified. Given indices i into an array ๐•จ (for example โŒฝโ†•โ‰ ๐•จ or a+โ†•b), this section can be searched with (iโˆพโ‰ ๐•จ)โŠหœ(iโŠ๐•จ)โА๐•ฉ. But this is clunky and difficult for the implementation to optimize.

Subtraction, division, and span are backwards

-

The left argument feels much more like the primary one in these cases (indeed, this matches the typical left-to-right ordering of binary operators in mathematics). Not really fixable; too much precedent.

+

The left argument feels much more like the primary one in these cases (indeed, this matches the typical left-to-right ordering of binary operators in mathematics). The commonly-paired โŒŠโˆ˜รท and | have opposite orders for this reason. Not really fixable; too much precedent.

Nothing (ยท) interacts strangely with Before and After

Since ๐•จFโŠธG๐•ฉ is (F๐•จ)G๐•ฉ and ๐•จFโŸœG๐•ฉ is ๐•จF G๐•ฉ in the dyadic case, we might expect these to devolve to G๐•ฉ and F G๐•ฉ when ๐•จ is not present. Not so: instead ๐•ฉ is substituted for the missing ๐•จ. And Before and After are also the main places where a programmer might try to use ๐•จ as an operand, which doesn't work either (the right way is the train ๐•จFโŠข).

Can't access array ordering directly

diff --git a/problems.md b/problems.md index 5bd7aa90..34f7de67 100644 --- a/problems.md +++ b/problems.md @@ -34,7 +34,7 @@ If you include multiple multi-line functions in what would otherwise be a one-li This includes index-of-last, and searching starting at a particular index, when the desired result indices are to the array to be seached *before* it is modified. Given indices `i` into an array `๐•จ` (for example `โŒฝโ†•โ‰ ๐•จ` or `a+โ†•b`), this section can be searched with `(iโˆพโ‰ ๐•จ)โŠหœ(iโŠ๐•จ)โА๐•ฉ`. But this is clunky and difficult for the implementation to optimize. ### Subtraction, division, and span are backwards -The left argument feels much more like the primary one in these cases (indeed, this matches the typical left-to-right ordering of binary operators in mathematics). Not really fixable; too much precedent. +The left argument feels much more like the primary one in these cases (indeed, this matches the typical left-to-right ordering of binary operators in mathematics). The commonly-paired `โŒŠโˆ˜รท` and `|` have opposite orders for this reason. Not really fixable; too much precedent. ### Nothing (`ยท`) interacts strangely with Before and After Since `๐•จFโŠธG๐•ฉ` is `(F๐•จ)G๐•ฉ` and `๐•จFโŸœG๐•ฉ` is `๐•จF G๐•ฉ` in the dyadic case, we might expect these to devolve to `G๐•ฉ` and `F G๐•ฉ` when `๐•จ` is not present. Not so: instead `๐•ฉ` is substituted for the missing `๐•จ`. And Before and After are also the main places where a programmer might try to use `๐•จ` as an operand, which doesn't work either (the right way is the train `๐•จFโŠข`). -- cgit v1.2.3