For operators, one note:
Since having vastly more characters for operators available might mean that precedence, associativity, etc. might need declarations to maintain sanity, doing something better than the past might be nice.
I’ve always found the way that ML, Coq, Haskell etc. declare precedence to be unreasonable. You say something like “this operator is at level 5”, but there’s nothing natural in the human brain that says immediately to you what that means.
One thing that has always occurred to me would be it would be reasonable to declare something as having the same, or higher, or lower (or both) precedence than some other operator or operators, so that if you read the declaration, you say, “aha!
- have lower precedence than
÷, which are in turn lower precedence than
~-!”, which seems far more natural than than “hrm, this has precedence level 7, what does that mean?”
Strawman syntax might be something derived from ML and Haskell like
infixl (= ∈) ∉
which would mean "
∉ has same precedence as
∈" — one could also have multiple clauses like
(> +; < √) to indicate greater than the
+ operator but below the
Also, this would necessitate having some way of allowing modules to export fixity and precedence information (the fact that ML can’t do that to my knowledge is irritating.)
Again, none of this should be taken too seriously. It might be a really terrible idea.