Home arrow static arrow Java Programming [Archive] - Operator OverLoading
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Operator OverLoading
This topic has 4 replies on 1 page.

Posts:15
Registered: 2/7/04
Operator OverLoading  
Feb 7, 2004 10:58 PM



 
Why the concept of operator overloading removed from JAVA. I mean there should be some reason for removal of a concept.If so what is it.
 

Posts:12,831
Registered: 2/22/00
Re: Operator OverLoading  
Feb 7, 2004 11:06 PM (reply 1 of 4)



 

It wasn't removed, it simply wasn't added.

When they created Java they avoided adding features that they felt had limited usefulness, resulted in buggy or convoluted designs, and/or were too costly to implement. I can't recall if operator overloading was one of these but it seems likely.
 

Posts:67
Registered: 9/25/02
Re: Operator OverLoading  
Feb 9, 2004 5:28 AM (reply 2 of 4)



 
These things come down to professional judgement, sometimes otherwise known as personal prejudice and/or religious outlook.

Whoever made that decision obviously thought that a lifetime of answering the question "why doesn't my string variable == this string constant when I know they've got the same contents" was a price worth paying. Or, maybe, he skipped out and left answering this question to others.
 

Posts:23
Registered: 10/22/97
Re: Operator OverLoading  
Feb 9, 2004 5:37 AM (reply 3 of 4)



 
I've found this:

(attributed to Jeff Nisewanger)

Personally, I favor the same solution for both operator overloading and projectile weaponry. I think you should have to go through a certified training course, pass a standardized test, obtain a hazard insurance policy overing damage to 3rd parties, and register on a yearly basis with the state. Abusive use of a gun or overloaded operator would be reported to the police and added to your state database record resulting in e-education training, loss of insurance, increased coverage cost, or limited future employment opportunity.

Once we have this infrastructure in place, we can consider adding operator overloading to the language.
 

Posts:13
Registered: 7/4/00
Re: Operator OverLoading  
Aug 2, 2004 1:15 AM (reply 4 of 4)



 
You can vote for a operator-overloading-rfe at:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4905919
 
This topic has 4 replies on 1 page.