What I heard on that talk was that, as a matter of policy, they do
not support operator overloading and they only use operators for
traditional mathematical operations.
My subject line mentions "precedence". If you look at the slides at
46:00 and 47:00. Steele basically says yes to operator if the language
uses unicode and programmers are disciplined enough to use unicode
operators with traditional mathematical meaning. (Well, I guess, there
are quite some operators in math that don't have a "traditional" meaning.)
But the point I wanted to make was that precedence is a difficult thing.
Since it is (traditionally) not transitive. Steele basically says that
it is better to use parentheses in order to make the meaning of the
program clear.
What I take that to mean, although I may have misunderstood, is that
infix operators can only be used for built-in types?
Wrong. Look the following slides.
That looks fine for a scientific programming language like Fortress
but is it really practical for a CAS?
It would be good if SPAD used UTF-8 as an input character set and would
enable programmers to define operators as prefix, infix or postfix to
get close to mathematical notation.
In fact, we all know that mathematical notation is not always precise to
the last bit. Steele shows examples like how to parse:
3 x sin x cos 2 x log log x (40:00)
We should accept that programming languages can help to make things more
precise.
Ralf
--
You received this message because you are subscribed to the Google Groups "FriCAS -
computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.