From 0d6c26b9aa607ff14e14e6488bace207e324022a Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Mon, 13 Jun 2022 13:20:34 -0400 Subject: =?UTF-8?q?Highlight=20[]=20as=20list=20brackets,=20like=20?= =?UTF-8?q?=E2=9F=A8=E2=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/commentary/problems.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/commentary/problems.html') diff --git a/docs/commentary/problems.html b/docs/commentary/problems.html index 38d41ea9..2937be17 100644 --- a/docs/commentary/problems.html +++ b/docs/commentary/problems.html @@ -35,7 +35,7 @@

Right-to-left multi-line functions go upwards

If you include multiple multi-line functions in what would otherwise be a one-liner, the flow in each function goes top to bottom but the functions are executed bottom to top. I think the fix in BQN is to just say give your functions names and don't do this. But left to right programming beckons.

Trains don't like monads

-

If you have the normal mix of monads and dyads you'll need a lot of parentheses and might end up abusing . Largely solved with the Nothing syntax ·, which acts like J's Cap ([:) in a train, but still a minor frustration.

+

If you have the normal mix of monads and dyads you'll need a lot of parentheses and might end up abusing . Largely solved with the Nothing syntax ·, which acts like J's Cap ([:) in a train, but still a minor frustration.

Under/bind combination is awkward

It's most common to use Under with dyadic structural functions in the form (iF), for example where F is one of / or . This is frustrating for two reasons: it requires parentheses, and it doesn't allow i to be computed tacitly. If there's no left argument then the modifier {𝔽(𝕨𝔾)𝕩} can be more useful, but it doesn't cover some useful cases such as mask a (u/) b. Another form of Under that's sometimes wanted is {𝕨𝔽𝔾𝕩}. One modifier can only do so much.

List splicing is fiddly

@@ -102,7 +102,7 @@

Monadic argument corresponds to left for / and

Called dyadically, both functions shuffle cells of the right argument around, which is consistent with other selection-type functions. But the monadic case applies to what would be the left argument in the dyadic case.

High-rank array notation awkwardness

-

The notation [] will be added for high-rank arrays, the same as BQN's lists ⟨⟩ except it mixes at the end. It looks okay with BQN strands but clashes with BQN lists. At that point it becomes apparent that specifying whether something is a high-rank array at the top axes is kind of strange: shouldn't it be the lower axes saying to combine with higher ones? A more concrete point of awkwardness is that literal notations can only form arrays with rank 1 or more, preventing unit arrays from being destructured. Syntax with < and [] would be complete over non-empty arrays.

+

The notation [] will be added for high-rank arrays, the same as BQN's lists ⟨⟩ except it mixes at the end. It looks okay with BQN strands but clashes with BQN lists. At that point it becomes apparent that specifying whether something is a high-rank array at the top axes is kind of strange: shouldn't it be the lower axes saying to combine with higher ones? A more concrete point of awkwardness is that literal notations can only form arrays with rank 1 or more, preventing unit arrays from being destructured. Syntax with < and [] would be complete over non-empty arrays.

Assert has no way to compute the error message

In the compiler, error messages could require expensive diagnostics, and in some cases the message includes parts that can only be computed if there's an error (for example, the index of the first failure). However, Assert (!) only takes a static error message, so you have to first check a condition, then compute the message, then call Assert on that. Kind of awkward, but better than it used to be before one-argument Assert was changed to use 𝕩 for the message. The issue generally applies to high-quality tools built in BQN, where giving the user good errors is a priority.

Monadic versus >

-- cgit v1.2.3