Click here to Skip to main content
15,867,956 members
Home / Discussions / C#
   

C#

 
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 
David1987 wrote:
Strings and floats and reflection are very often abused. Enough so that I see such abuses pop up in the C# forum about every few weeks or so.


That is not evidence that in total lines of code that it occurs 'often'.

And you see Strings misused?

David1987 wrote:
String abuse is especially bad since it causes performance trouble real quick


I have seen claims of that. And hypothetical arguments about it. I have never seen it occur in a real application.

Presumably you have. Could you describe the nature of that problem and the impact on the application performance pre and post?

David1987 wrote:
Sure, you can put everything on one line.. which is a different kind of abuse, also made possible by java, but easily defeatable with auto-formatting.


That isn't what I meant.

Given a count of lines of code in the world for all languages, the number of lines of code involving vectors (mathematical) is so small that one is unlikely to be able to measure it enough to get it above the error rate of the measurement process itself.

David1987 wrote:
The raytracer we had to write in University became a horror of tangles Subtract's and Multiply's that in no way looked like the actual formula's. It sucked. With operator overloading it wouldn't have been such a pain.


Since most of OO programming involves method calls why is this different than any other OO programming task?
Or misusing some other OO idiom such as method chaining.

And how many total code lines were in the application? And how many code lines were specific to vector arithmetic operations?

David1987 wrote:
Prove it. I've never seen it.


Then here you go...

http://thedailywtf.com/Comments/Yet-Another-Operator-Overloading-Abuse.aspx?pg=4[^]
GeneralRe: Operator overloading, when to Pin
David198716-Apr-11 20:10
David198716-Apr-11 20:10 
GeneralRe: Operator overloading, when to Pin
jschell18-Apr-11 9:04
jschell18-Apr-11 9:04 
GeneralRe: Operator overloading, when to Pin
David198718-Apr-11 19:30
David198718-Apr-11 19:30 
GeneralRe: Operator overloading, when to Pin
jschell19-Apr-11 8:44
jschell19-Apr-11 8:44 
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:50
jschell20-Apr-11 7:50 
GeneralRe: Operator overloading, when to Pin
David198720-Apr-11 7:53
David198720-Apr-11 7:53 
GeneralRe: Operator overloading, when to Pin
Niklas L13-Apr-11 21:11
Niklas L13-Apr-11 21:11 
GeneralRe: Operator overloading, when to Pin
jschell14-Apr-11 9:30
jschell14-Apr-11 9:30 
AnswerRe: Operator overloading, when to Pin
jschell13-Apr-11 8:58
jschell13-Apr-11 8:58 
GeneralRe: Operator overloading, when to Pin
Niklas L13-Apr-11 9:51
Niklas L13-Apr-11 9:51 
QuestionHow to use Uml. Pin
Anubhava Dimri12-Apr-11 22:19
Anubhava Dimri12-Apr-11 22:19 
AnswerRe: How to use Uml. Pin
Pete O'Hanlon12-Apr-11 22:55
subeditorPete O'Hanlon12-Apr-11 22:55 
QuestionRe: How to use Uml. [modified] Pin
#realJSOP13-Apr-11 2:19
mve#realJSOP13-Apr-11 2:19 
GeneralRe: How to use Uml. Pin
Anubhava Dimri13-Apr-11 2:22
Anubhava Dimri13-Apr-11 2:22 
GeneralRe: How to use Uml. Pin
Ravi Sant14-Apr-11 0:57
Ravi Sant14-Apr-11 0:57 
GeneralRe: How to use Uml. Pin
wizardzz13-Apr-11 11:20
wizardzz13-Apr-11 11:20 

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.