This is not exactly a shocker.

Just take this example, from an array language Klong 1 that looks really nice:

{&/x!:\2+!_x^1%2}

I am not used to this. I kind of wish I could read that (right-to-left). The author kindly breaks it down for us, building up from

1%2    --->  "1 divides 2"
x^1%2  --->  "x to the power .."

I just get frustrated we can’t write that as a superscript, like we would on paper:

1/2

x1/2

⎣x1/2

0<⎣x1/2

2..⎣x1/2⎦+1

*{ x mod d d ∈ ℕ2..⎣x1/2⎦+1}*
*min { x mod d d ∈ ℕ2..⎣x1/2⎦+1}*
*def prime(x) := true iff 0 < min { x mod d d ∈ ℕ2..⎣x1/2⎦+1}*

Something like that.

HTML can do it pretty easily. If only we wrote code in HTML, and the compiler/interpreter could read it.

I don’t really know much about array languages, but I do know it’d be a lot easier to read if the compilers read HTML. I can read HTML, and I’m just some dumb human, so it seems pretty doable, but what do I know, right?

This just gets a lot closer to what you’d actually maybe write on a board:

*def prime(x) := true iff 0 < min { x mod p p ∈ ℙ⎣x1/2}*

Anyhow I don’t think Klong is bad, K is bad, no no, just hard to read as an outsider, and I don’t think that’s widely disputed. This way of doing it probably invites ambiguity, but I imagine you could carve out a subset, call it “opinionated”, and just don’t support expressions that aren’t supported. I wrote min and mod but maybe you wanted other operators like % that aren’t supported. You can’t support everything.

I think the Mathematical Unicode Operators2 are a great step forward, now that we can embed them in the HTML and expect a user font to render them reasonably well, and we can use them in-line, select them, &c.

  1. https://t3x.org/klong/prime.html 

  2. see https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode and https://www.unicode.org/charts/PDF/U2200.pdf &c