Re: operator overloading
On Thu, 8 May 2008, Roedy Green wrote:
On Thu, 8 May 2008 04:47:53 -0700 (PDT), josh <xdevel1999@gmail.com>
wrote, quoted or indirectly quoted someone who said :
I don't find any document that say if the operator overloading will be
a new feature of the Java 7
Usually when the matter comes up, there is a quite a squawk of "over
my dead bodies".
My view is user defined operators with new names/symbols would be
acceptable, but overloading ordinary >> to do I/O is as C++ is an
abomination. Unicode has lots of symbols you could use as user-defined
operators.
As Patricia pointed out, this doesn't help the rather major case of
wanting to do maths on compound types with conventional operators.
I said it before and i'll say it again: the crimes committed in C++
reflect cultural, not technical, problem. Other languages let you overload
<< and >>, amongst other things, and haven't seen any abuse at all.
tom
--
For the first few years I ate lunch with he mathematicians. I soon found
that they were more interested in fun and games than in serious work,
so I shifted to eating with the physics table. There I stayed for a
number of years until the Nobel Prize, promotions, and offers from
other companies, removed most of the interesting people. So I shifted
to the corresponding chemistry table where I had a friend. At first I
asked what were the important problems in chemistry, then what important
problems they were working on, or problems that might lead to important
results. One day I asked, "if what they were working on was not important,
and was not likely to lead to important things, they why were they working
on them?" After that I had to eat with the engineers! -- R. W. Hamming