Jonathan Lee said:
I really just mean the notation. As it is I pretty much do as you've
suggested, and mimic the functionality (though I tend to use '<' to
hint at subset notationt). But I'm more of a mathematician than a
programmer so it doesn't really "feel" right. Highly subjective, I
know.
But I don't immediately see what would be wrong with allowing the user
to introduce new binary operators. Source could be written in Unicode,
so that's not a huge issue. And precedence could be specified at the
time of declaration:
operator @ like ^; // new operator, @, has precedence of ^
I see the potential for abuse, but used correctly I think it would
make a lot of things more readable.
I don't think it is a good idea to add operators to a general purpose
language for each mathematical operation that mathematicians can
think of. Giving each of them a separate character is also not a
good idea. My keyboard is not big enough and I don't like
more keys like shift, alt, Ctrl, and combinations thereof.
Maybe that a mathematician would find it easier to read,
for others it will become very difficult to understand the differences
between *, ¤, ∈, ×, /,â„, ÷, ·, ., ¯,–, —,¬,-,ø,‡,†.
The language should define a small amount of elementary operations
in which other more complex operations can be expressed.
more complex operators should have a descriptive name.
I think C++ offers enough elementary operations for integral numbers.
and the possibility to extend it with classes and overloading are also sufficient.