Click here to Skip to main content
15,888,610 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: Operator overloading, when to Pin
jschell14-Apr-11 9:20
jschell14-Apr-11 9:20 
David1987 wrote:
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.



Since the vast majority of programming in the world does not involve that it isn't a significant problem.

And since most programs that do deal with specialized numerics often have other requirements, such as performance and or significant other functionality (non-numeric) then one should either choose an appropriate language or live with the small amount of code that java entails.

The obvious analogy to that is that SQL is very poor candiate for string manipulation and regexes and thus applications used widely, such as editors, should not be written in SQL. That however doesn't mean that SQL suffers because of it.


David1987 wrote:
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.


No.

It is not a question of whether abuse can happen.

The point is that it does happen.

Enough so that me and others have seen it.

And it is not accidental.
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 
GeneralRe: Operator overloading, when to Pin
David198716-Apr-11 20:10
David198716-Apr-11 20:10 

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.