Darren Duncan wrote:
For the record, my preference is to have the generics be the shortest,
[==,!==,<=>,<,>,<=,>=], and use [+,~] prefixes for Num or Str casting
versions.  And lengthen the bit-shift operators to use thin-tailed
arrowheads as you suggested.

I like this proposal for its orthogonality. And it allows to introduce
some more binary boolean functions:

  ?<  inhibition    ?>  reverse inhibition
  ?>= implication   ?<= reverse implication (dual of the above)
  ?== equivalence (dual of xor)

The only ones we lack then are nand !&& and nor !|| :)
But they fall out naturally from the meta boolean negation
---which means equivalence might be spelled !^^ as well.
The low precedence versions might be spelled inh, rinh, imp and rimp.
Hmm, and eqv ;)

BTW, could we define that the arithmetic shift ops do just that,
whereas the string ones do logical shift? And in addition that for
the bit inversion +^$a == -1 - $a holds? Note that -1 == +^0. Note
further that in infinite precision the arithmetic shift left maintains
the sign in two's complement representation and we get the equality
$a +<- $n == $a * 2**$n where Int $n >= 0. In this I assume a big
endian representation. Hmm, and since + indicates numeric not integer
we could even demand $a +-> $n == $a / 2**$n where Int $n >= 0. Well,
and we could "shift" with non-Ints through these equalities. Not to
mention the introduction of a base used in the shift provided as adverb:
$a +->:10 $n == $a * 10**$n.

Regards, TSa.

Reply via email to