Click here to Skip to main content
15,916,189 members
Home / Discussions / C#
   

C#

 
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 
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 
David1987 wrote:
Your own argument defeats yourself. C# is a general purpose language and so
should be able to deal with it if some calculations are required.


I see no problem with creating a vector library in Java. So no it doesn't defeat my point.

And a general purpose language is NOT intended to be able to solve all problems and is certainly NOT intended to solve all of them in an ideal way either.

David1987 wrote:
Operators exist for built-in types, not allowing them on "everything else" makes
the built-in types more special. In Java they are even more special and that
sucks even more. It's not "nice" or "elegant" and it has bitten almost everyone
who learned the language.


I have seen a lot of code in a lot of languages.

Some elegant some not.

But nothing in that statement has anything to do with operator overloading.


David1987 wrote:
It is impossible to do so anyway. Just don't abuse it then. C# also does not
limit method overloading and virtual methods and strings in such a way that you
can't abuse them. Nor should it try to, you'd end up with a language that you'd
have to fight at every turn to get something done. (like Haskell? and even
haskell, for all its 'purity' has unsafePerformIO - and is not immune to string
abuse, which is probably impossible to ban)




To make it specifically clear - I do not accept your analogy of strings/virtuals as equivalent to operator overloading.

A better analogy would be inheritance which is abused a great deal.

However eliminating inheritance does not leave one with an alternative. That isn't true for operator overloading.
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
mvePete O'Hanlon12-Apr-11 22:55 
QuestionRe: How to use Uml. [modified] Pin
#realJSOP13-Apr-11 2:19
professional#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 
GeneralRe: How to use Uml. Pin
#realJSOP13-Apr-11 11:50
professional#realJSOP13-Apr-11 11:50 
QuestionRe: How to use Uml. Pin
Pete O'Hanlon13-Apr-11 22:02
mvePete O'Hanlon13-Apr-11 22:02 
QuestionRe: How to use Uml. Pin
#realJSOP14-Apr-11 2:04
professional#realJSOP14-Apr-11 2:04 
AnswerRe: How to use Uml. Pin
#realJSOP14-Apr-11 2:06
professional#realJSOP14-Apr-11 2:06 

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.