United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4905919 : RFE: Operator overloading

Details
Type:
Enhancement
Submit Date:
2003-08-13
Status:
Closed
Updated Date:
2011-10-31
Project Name:
JDK
Resolved Date:
2011-10-31
Component:
specification
OS:
linux,generic,windows_xp,windows_2000
Sub-Component:
language
CPU:
x86,generic
Priority:
P4
Resolution:
Won't Fix
Affected Versions:
1.4.2,5.0,6
Fixed Versions:

Related Reports
Duplicate:
Relates:
Relates:

Sub Tasks

Description
Name: rmT116609			Date: 08/13/2003


A DESCRIPTION OF THE REQUEST :
There is an intensive discussion about adding operator overloading to the java language

Please also see:

http://developer.java.sun.com/developer/bugParade/bugs/4087427.html

JUSTIFICATION :
This post is made to give the people the chance to discuss and vote.
(Incident Review ID: 199033) 
======================================================================

Name: rmT116609			Date: 08/12/2004


A DESCRIPTION OF THE REQUEST :
Even though there's a sort of JVM operator overloading (see toString or the == in enum), this language feature is still missing as a general language extension.


JUSTIFICATION :
Operator overloading can be avoided using functions, of course, but there are cases where the code become more readable, simpler and self-documenting.
I do know all the pros and cons about this, but as I heard similar things for some of the new great improvement on the way with 1.5, I don't see why the operator overloading has been left apart.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The behaviour would be much like the normal c++ behaviour.
ACTUAL -
No behaviour can be described as it's a non permitted syntax expression.

---------- BEGIN SOURCE ----------
public class MultiTierApp {
...
}

public class Tier1 implements Tier {
}

public class Tier2 implements Tier {
}

MultiTierApp mta = (new Tier1) + (new Tier2);
---------- END SOURCE ----------
(Review ID: 296755)
======================================================================

                                    

Comments
EVALUATION

Proposals for new features in the Java programming language are no longer being accepted or maintained in the bug database at http://bugs.sun.com/. This also applies to proposals for new features in the Java Virtual Machine (that is, in the abstract JVM, as opposed to a JVM implementation like HotSpot).

All proposals for new features should be made through the "JDK Enhancement - Proposal & Roadmap Process" described at http://openjdk.java.net/jeps/1.

Consequently, this specific request to change the Java programming language will not be considered further.

The bug database continues to accept and maintain submissions about technical errors in the design and specification of the Java programming language and the Java Virtual Machine.
                                     
2011-10-31
EVALUATION

I have always objected to this, but I'll leave it os people can vote.

###@###.### 2003-08-20
                                     
2003-08-20



Hardware and Software, Engineered to Work Together