Click here to Skip to main content
16,020,714 members
Home / Discussions / C#
   

C#

 
AnswerRe: Operator overloading, when to Pin
_Erik_12-Apr-11 22:37
_Erik_12-Apr-11 22:37 
AnswerRe: Operator overloading, when to Pin
David198712-Apr-11 22:50
David198712-Apr-11 22:50 
AnswerRe: Operator overloading, when to Pin
BobJanova13-Apr-11 1:20
BobJanova13-Apr-11 1:20 
AnswerRe: Operator overloading, when to Pin
PIEBALDconsult13-Apr-11 2:59
mvePIEBALDconsult13-Apr-11 2:59 
GeneralRe: Operator overloading, when to Pin
jschell13-Apr-11 9:04
jschell13-Apr-11 9:04 
GeneralRe: Operator overloading, when to Pin
PIEBALDconsult13-Apr-11 15:29
mvePIEBALDconsult13-Apr-11 15:29 
GeneralRe: Operator overloading, when to Pin
jschell14-Apr-11 9:24
jschell14-Apr-11 9:24 
GeneralRe: Operator overloading, when to Pin
David198713-Apr-11 19:30
David198713-Apr-11 19:30 
You can abuse almost any language feature..
The "no operator overloading" along with the "no structs" (though that one is not as bad) restrictions make it impossible to create proper new numeric types in Java, and that just sucks. It makes the predefined types more magic, and it makes working with any non-predefined numeric type a pain.

As for the abuse, sure, you can do that. You can also have overloads Foo(int) and Foo(long) and have them do something completely different - that's on the same level as operator overloading abuse, but Java still allows that. You can also override some method (accidentally even, in Java) and have it completely break the Liskov substitution principle.
GeneralRe: Operator overloading, when to Pin
jschell14-Apr-11 9:20
jschell14-Apr-11 9:20 
GeneralRe: Operator overloading, when to Pin
David198714-Apr-11 9:47
David198714-Apr-11 9:47 
GeneralRe: Operator overloading, when to Pin
jschell15-Apr-11 8:36
jschell15-Apr-11 8:36 
GeneralRe: Operator overloading, when to Pin
David198715-Apr-11 8:39
David198715-Apr-11 8:39 
GeneralRe: Operator overloading, when to Pin
jschell16-Apr-11 10:33
jschell16-Apr-11 10:33 
GeneralRe: Operator overloading, when to Pin
David198716-Apr-11 19:59
David198716-Apr-11 19:59 
GeneralRe: Operator overloading, when to Pin
jschell18-Apr-11 9:10
jschell18-Apr-11 9:10 
GeneralRe: Operator overloading, when to Pin
David198718-Apr-11 19:33
David198718-Apr-11 19:33 
GeneralRe: Operator overloading, when to Pin
jschell19-Apr-11 8:48
jschell19-Apr-11 8:48 
GeneralRe: Operator overloading, when to Pin
David198719-Apr-11 9:18
David198719-Apr-11 9:18 
GeneralRe: Operator overloading, when to Pin
jschell20-Apr-11 7:44
jschell20-Apr-11 7:44 
GeneralRe: Operator overloading, when to Pin
David198719-Apr-11 9:54
David198719-Apr-11 9:54 
GeneralRe: Operator overloading, when to Pin
jschell20-Apr-11 7:47
jschell20-Apr-11 7:47 
GeneralRe: Operator overloading, when to Pin
David198714-Apr-11 10:01
David198714-Apr-11 10:01 
GeneralRe: Operator overloading, when to Pin
jschell15-Apr-11 8:52
jschell15-Apr-11 8:52 
GeneralRe: Operator overloading, when to Pin
David198715-Apr-11 9:14
David198715-Apr-11 9:14 
GeneralRe: Operator overloading, when to Pin
jschell16-Apr-11 11:05
jschell16-Apr-11 11:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.