• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Java vs C# (balanced view)

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For a balanced view click both links:
http://www.geocities.com/csharpfaq
http://genamics.com/developer/csharp_comparative.htm
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "Best Practices" from the first link are really eye opening!!
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C# Best Practice: Do not use C#
 
Ranch Hand
Posts: 1246
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's nothing balanced about the second link. He does a good job of explaining the features of C# that aren't in java, and then concludes by writing:


27. Conclusion
I hope this has given you a feel for where C# stands in relation to Java and C++. Overall, I believe C# provides greater expressiveness and is more suited to writing performance-critical code than Java, while sharing Java's elegance and simplicity, which makes both much more appealing than C++.
Ben Albahari,
Genamics.


Then the very next line is his ADVERTISEMENT for his book on C#!!!


C# Essentials
by Ben Albahari, Peter Drayton, Brad Merrill


No wonder he thinks C# is better than java. He makes money promoting it.
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Things that are better in C#:
1) foreach
2) enums
3) delegates
4) automatic boxing of primitives
5) switch statement can use a string
6) getter/setter to simulate property
Things that are better in Java:
1) automatic run time binding of methods (don't have to use virtual/override)
2) required catching of thrown exceptions
3) lack of operator overloading
4) lack of pass by reference
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Cindy Glass:
The "Best Practices" from the first link are really eye opening!!


And I disagree with all of them.
 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

There's nothing balanced about the second link. He does a good job of explaining the features of C# that aren't in java, and then concludes by writing:


It is very difficult to write a balanced overview of C# v/s Java. If you favor C# you will be accused of selling your soul to Microsoft and if you favor Java you will be accused of being a Sun zealot.
He has given us a good presentation on C# from a developer's viewpoint.
If you work in a company where somebody is trying to evangalize C#, these are the arguments that will be used extensively. Be prepared with reasonable counter arguments if you want to defend Java.
Cheers
[ April 16, 2002: Message edited by: Ravi Veeraghanta ]
[ April 16, 2002: Message edited by: Ravi Veeraghanta ]
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the way, the first link is written by a Java developer/zealot. The purpose of his FAQ is to attack language features in C# that differ from Java. His use of delegates, for example, is completely counter to their intended use. C# provides interfaces for what he is doing in his example.
Here's a quote from the author of the FAQ:
"I despise Microsoft products, but I don't spend all my time on microsoft.* newsgroups trying to dissuade people from using MS products." The rumor is that he works for Oracle.
[ April 16, 2002: Message edited by: Thomas Paul ]
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahem - now what did the original poster say?

For a balanced view click both links:


Note the word both. "Apu" is suggesting that neither link is balanced by itself, but together they might be.
No wonder he thinks C# is better than java. He makes money promoting it.
To be fair, Ben Albahari co-wrote an O'Reilly book on C#. Not the strongest group of Microsoft supporters in the world there. I wouldn't assume it automatically makes him biased.
And personally, I trust Darth Thomas' statements on the subject. For now. I certainly wouldn't mind having a foreach in Java, at least.
[ April 16, 2002: Message edited by: Jim Yingst ]
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Thomas Paul:
3) lack of operator overloading
4) lack of pass by reference


i think no 3 and 4 is weakness of java not its better part....
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by gautam shah:

i think no 3 and 4 is weakness of java not its better part....


I disagree. A statement like:
if (myShippingObject == yourShippingObject)
is completely ambiguous in C#. Is this a reference comparison? Is this a comparison on the contents of the object?
A statment like:
if (myShippingObject.equals(yourShippingObject))
is much clearer.
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by gautam shah:

i think no 3 and 4 is weakness of java not its better part....


Pass by reference is a violation of encapsulation. An OO language should not permit it as it can lead to unexpected side effects.
 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thomas, that's exactly right! Pass By Reference is a violation of the rules of good OO Programming.
What makes this "feature" of permitting ByVal and ByRef parameters possible in C# even more frustrating and confusing, is that any method can have a mix of ByVal and ByRef parameters.
Try sifting through the various layers of an application to find a bug, only to find out that a mix of bloody ByVal and ByRefs have been sprinkled all over the place!
I like the simple elegance of Java, and there isn't anything I've seen that comes close.
Regards,
Reuben.
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For those unfamiliar with the foreach in C#:
foreach allows you to do neat things with any Collection or Array:
public void Method(ArrayList a) {
foreach (Shipment s in a) {
//do some stuff with s
}
This will iterate through the ArrayList. It does throw an exception (invalid cast) if the ArrayList does not contain all Shipment objects.
[ April 17, 2002: Message edited by: Thomas Paul ]
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Thomas Paul:
Things that are better in C#:
1) foreach
4) automatic boxing of primitives


both of these topics are being looked at for J2SE 1.5 aka "Tiger"
Check these out for more info:
http://java.sun.com/features/2002/03/totiger.html
TS-1756: J2SE 1.4 and Beyond -- JavaOne 2002 Session, check out slide #31
 
gautam shah
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Thomas Paul:

A statment like:
if (myShippingObject.equals(yourShippingObject))
is much clearer.


only just because of this kind of clearity and comfort for the programmer, now a days java programmers are about to die in their fields.A language that allow programmer to select their own meaning of any operator or write their own function suit to their requirement is much much superior then JAVA like languages which makes programmer a perfect handicapped.

C++ which provides a way to create reference (via &) at the time of call is a feature that is some time very much required . its a different thing that the web applications doesn't required that kind of features.
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by gautam shah:

only just because of this kind of clearity and comfort for the programmer, now a days java programmers are about to die in their fields.A language that allow programmer to select their own meaning of any operator or write their own function suit to their requirement is much much superior then JAVA like languages which makes programmer a perfect handicapped.
C++ which provides a way to create reference (via &) at the time of call is a feature that is some time very much required . its a different thing that the web applications doesn't required that kind of features.


So if a programmer decides that the plus sign will delete the current object, that is a good thing? The problem is that running an operation on an object is a debatable point as to its meaning. Objects should be operated on by method calls. That is OO.
As to your second point, there is never a good reason to pass by reference.
 
Mapraputa Is
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If to speak seriously, it would be strange, if C# did not do any improvement on Java. Generally, I do not think it's a good thing to stick with on particular language too much. Concepts are important, how and where they are realized is secondary.
 
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Having coded in C++ for 6 years vs Java for three I haven't missed overloaded operators for a second of the last three years. I always had to fix other people's operators because they didn't do them right. Towards the end of my C++ career most projects I was on just avoided them.
I guess operator overloading is a nice shortcut, if done correctly, but not a necessary feature of a language.
John
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are a couple of places that it is used nicely in C#. For example, you use the += to add yourself to an event handler's notification list. But I could easily live without operator overloading.
I aslo think that C# (like Java) is an evolving language and there will be changes in the future.
 
John Wetherbie
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thomas,
In the example you gave, did you overload the operator or is it a feature of C#? It's just my opinion that user created operators aren't really all that necessary and caused as many dev problems as they solved. One's provided in the language are usually nice to have (and work as they should).
John
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with you John. The operator overloading example I gave is a C# feature. I will probably never use operator overloading.
 
Jim Yingst
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James Gosling has come to agree that Java would benefit from adding some limited forms of operator overloading, especially for numerical computing with complex numbers and matrices - check this out.
[ April 21, 2002: Message edited by: Jim Yingst ]
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the best arguments I heard against the creation of C# was this:
When Java came around, there was a huge NEED for it. C/C++ required you to write to a particular platform. The "write-once, run-anywhere" of Java allowed you developers to write one platform and deploy to another (or any for that matter)... And then there's all the built in functionality (the .util* package for one)... and of course the fact that you don't have to worry about pointers!
With C#... it doesn't bring any major functionality to the table... -- it adds some neat enhancements, that have been listed above... but there are no major "oh-wow's" like there were with Java when it was first released
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What made C# a required product was that Sun blocked Microsoft from using Java. They virtually forced the creation of C#. Now Sun gets to have the "purity" of java protected from the evil empire adding extensions and Microsoft gets a language they can use to unite VisualBasic and C++. The only people that get hurt are the programmers who have to learn new languages because the billionaires never learned how to share their toys.
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to keep in mind that Microsoft and Sun do not have the same types of problems. Microsoft has thousands of developers developing Windows and COM applications using C++ and VisualBasic. They are not about to abandon this group and tell them to go learn Java. They needed a way to bring the latest distributed technology to these developers while still allowing them to continue to develop in their favorite languages. Also, they weren't about to tell developers writing Windows applications that they must go to AWT/Swing. The fact is that native applications are a lot faster and most developers don't need to develop applications that are cross platform. If you are writing a trading application and all your traders use Windows, why develop an app that is slower just to get cross platform capability? Sun, of course, doesn't care about Microsoft's problems so they took Java away. Now Microsoft is getting back at Sun by removing Java completely from Windows.
 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe I'm a little confused, but aren't Java apps just as "native" as C# apps? Both use JIT.
 
Apu Petilon
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Jessica Sant:
One of the best arguments I heard against the creation of C# was this:
When Java came around, there was a huge NEED for it. C/C++ required you to write to a particular platform. The "write-once, run-anywhere" of Java allowed you developers to write one platform and deploy to another (or any for that matter)... And then there's all the built in functionality (the .util* package for one)... and of course the fact that you don't have to worry about pointers!
With C#... it doesn't bring any major functionality to the table... -- it adds some neat enhancements, that have been listed above... but there are no major "oh-wow's" like there were with Java when it was first released


I agree tht WORA is one of the market demands that Java addressed. In fact WORA is the number one reason developers flocked to Java. But don't forget the #2 reason: Simplicity!!! Developers who had been burned by C++ wanted a simpler language. Gosling has said that simplifying C++ was one of the goals of Java.
What C# has done is to add all the complexity back to Java. Whether this is a good thing or not time will tell. With C# you have no WORA, and you have no simplicity. C# is in many respects more complex than C++.
Regarding operator overloading, please take the Test #2 in the C# FAQ http://www.geocities.com/csharpfaq and prepare to be shocked when you read the answer to Test #2. Also read the conclusions and recommendations at the bottom of the answer page.
Many of the "neat enhancements" that people talk about in C# are poorly done. Mostly they save typing at the expense of adding complexity. C# is like Perl in this respect. There are plenty of neat hacks in Perl that are designed to let you do a lot of things with very few keystrokes. But the side-effect is that Perl programs are notoriously hard to follow.
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Andre Mermegas:
Maybe I'm a little confused, but aren't Java apps just as "native" as C# apps? Both use JIT.

There's a big difference. The Windows OS is part of .Net. When a .Net program creates an object on the screen, it is still using the Microsoft Foundation Classes, not attempting to draw the objects itself. This is why a .Net app is so much snappier than a Swing app. The objects used in Windows Forms for .Net languages are an abstraction over MFC, not a replacement for MFC. Microsoft has exposed all the features of MFC in an OO environment. The problem with the AWT wasn't the speed... it was the paucity of objects. This was due to WORA. The least common denominator factor prevented Microsoft only objects from being exposed by the AWT.
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Apu Petilon:
What C# has done is to add all the complexity back to Java. Whether this is a good thing or not time will tell. With C# you have no WORA, and you have no simplicity. C# is in many respects more complex than C++.

This is simply not true. As a Java developer (6 years) who has learned C#, I can tell you that C# is not anymore complex than Java. And if operator overloading is such a problem, why does Gosling want to add it back to Java? I personally do not like operator overloading in most cases, but I think I am smart enough to use the tool only at the right time. Do you tell a carpenter that he can't have a drill because he might use it in the wrong place?
Again the issue of WORA is not as clear cut as you might think. First there will be a Unix port of C#. Second, not every program requires WORA. Why should we always sacrifice speed in favor of WORA? If I am writing an application for a Windows environment, why should I suffer with the slowness of Swing for all my users just so that someday I can run this application in Linux?
 
Apu Petilon
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Thomas Paul:
This is simply not true. As a Java developer (6 years) who has learned C#, I can tell you that C# is not anymore complex than Java.


A disingenuous statement if I have ever seen one. If one language has properties, operator overloading, indexers, structs, implicit type conversion operators etc how can that language be no more complex than a language doesn't have any of those features? In C# the statement x.y += a\[b\]; can contain 10 hidden function calls. In Java the same statement can contain no function calls. Is C# as simple as Java? For more info see http://www.geocities.com/csharpfaq/test2.html

Originally posted by Thomas Paul:

And if operator overloading is such a problem, why does Gosling want to add it back to Java?


Gosling acknowledges that for numerical computing (as opposed to programming in general) operator overloading is useful. There is a right way and a wrong way for a language to implement operator overloading. The right way is to only allow overloading of special characters so that a maintenance programmer will have no problem spotting it. See Guy Steele's suggestion mentioned in Gosling's page: http://java.sun.com/people/jag/FP.html
The wrong way to do it is to allow ordinary operators such as + to be overloaded. This will cause code maintenance headaches as there will be no easy way to tell which + is just an ordinary addition, and which + is in reality a function call.

Originally posted by Thomas Paul:

I personally do not like operator overloading in most cases, but I think I am smart enough to use the tool only at the right time. Do you tell a carpenter that he can't have a drill because he might use it in the wrong place?


Some people suggest that if you don't like a feature x in a language just avoid x -- problem solved. In reality it is not as simple as that. For the school to be safe is it sufficient if your kid doesn't take a gun to school? No. You don't wany *any* kid to take guns to school. Unless there is a total ban on guns in school, the school will not be safe. Similarly, just because you avoid certain features of C# that doesn't mean your fellow programmers will too.

Originally posted by Thomas Paul:

Again the issue of WORA is not as clear cut as you might think. First there will be a Unix port of C#. Second, not every program requires WORA. Why should we always sacrifice speed in favor of WORA? If I am writing an application for a Windows environment, why should I suffer with the slowness of Swing for all my users just so that someday I can run this application in Linux?


Many years ago Microsoft told their customers that ActiveX (COM/DCOM) is open and portable. How many platforms is COM+ (the next version of COM) available on today?
[ April 22, 2002: Message edited by: Apu Petilon ]
[ April 22, 2002: Message edited by: Apu Petilon ]
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow, the language has 3 things that are harder than Java so the language is harder! Well, there are other things that are easier to do in C# so maybe Java is harder. So on a scale of 1 to 100, C# is .1 harder than Java. If you can't handle that then I suggest Visual Basic may be a good choice for you.
As far as the examples from the "C# FAQ", the person who wrote that did it as a worst case scenario. He "despises" Microsoft and all Microsoft products. He constantly posts on the C# newsgroups to brag about how wonderful Java is. He is a jerk.
As far as operator overloading goes, sometimes it si useful. Java said who cares let's eliminate it. C# says let's leave it in and have people use it wisely. Sure you can use it unwisely. But there are plenty of language features in Java that are poorly done that can cause code confusion. That is what separates programmers from hackers.
Parts of .Net and C# have been given to ECMA. There will be a C# port because it has nothing to do with Microsoft. Java is still controlled by Sun. Or perhaps you forgot that Sun pulled Java away from ECMA at the 11th hour?
Finally, Java never had to concern itself with compatibility with other languages. C# needs to be compatible with C++. There are millions of lines of code written in C++ that will run today in .Net without needing to change a single line of code. And C# developers can use that huge code base to work with, inherit from, create DLLs with or anything else they want.
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apu, isn't is curious that you have never posted a single line in any other thread in JavaRanch ever? The only thing that you seem concerned about is C#. Does C# scare you that much? Or are you just a troll?
And I'm moving this to Meaningless Drivel because it has nothing to do with Java News.
[ April 22, 2002: Message edited by: Thomas Paul ]
 
Ravi Veera
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Parts of .Net and C# have been given to ECMA. There will be a C# port because it has nothing to do with Microsoft. Java is still controlled by Sun. Or perhaps you forgot that Sun pulled Java away from ECMA at the 11th hour?
Finally, Java never had to concern itself with compatibility with other languages. C# needs to be compatible with C++. There are millions of lines of code written in C++ that will run today in .Net without needing to change a single line of code. And C# developers can use that huge code base to work with, inherit from, create DLLs with or anything else they want.


Sorry Thomas, but you seem to be quoting straight out of Microsoft Marketing literature.
Having C# as a standard means nothing. It allows Microsoft to claim it's open while it still retains control of the .NET platform. Just as microsoft apps like word,excel etc. use undocumented features of the windows api you can be rest assured that microsoft apps/compilers will run best on microsoft .NET platform.
Have you taken a few thousand lines of non trivial production C++ code and tried to use it on .Net? It is laughable to think that all the legacy code wirtten in COBOL/C++ will somehow automagically run on .NET.
Also be nice enough to leave a note when you are moving topics from one forum to another.
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Ravi Veeraghanta:

Sorry Thomas, but you seem to be quoting straight out of Microsoft Marketing literature.
Having C# as a standard means nothing. It allows Microsoft to claim it's open while it still retains control of the .NET platform. Just as microsoft apps like word,excel etc. use undocumented features of the windows api you can be rest assured that microsoft apps/compilers will run best on microsoft .NET platform.
Have you taken a few thousand lines of non trivial production C++ code and tried to use it on .Net? It is laughable to think that all the legacy code wirtten in COBOL/C++ will somehow automagically run on .NET.
Also be nice enough to leave a note when you are moving topics from one forum to another.

I have no idea about COBOL but 100% of C++ code that runs in VC++ will compile and run in .Net. It will run as unmanaged code but it will run.
The comment about MS apps/compilers has nothing to do with C#. C# is an open standard. Anyone can write a C# compiler. Apu's comment was that this wouldn't happen but clearly it is happening.
As far as leaving a note when I moved the topic, you found it didn't you?
 
Ranch Hand
Posts: 4702
9
Scala Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
apu,
glad someone finally thought about the poor slob who has to enhance or change code. i have never had to do that for any code but my own, but from this discussion i noticed right away what a nightmare it could be if i did have to and i didnt even know what an operator did.
[ April 22, 2002: Message edited by: Randall Twede ]
 
Apu Petilon
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Thomas Paul:
Apu, isn't is curious that you have never posted a single line in any other thread in JavaRanch ever? The only thing that you seem concerned about is C#. Does C# scare you that much? Or are you just a troll?
And I'm moving this to Meaningless Drivel because it has nothing to do with Java News.
[ April 22, 2002: Message edited by: Thomas Paul ]


I am not going to respond to your personal attacks because I don't think a lot of people here wants to read either your personal attacks or my response to them.
 
Apu Petilon
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Thomas Paul:
Wow, the language has 3 things that are harder than Java so the language is harder! Well, there are other things that are easier to do in C# so maybe Java is harder. So on a scale of 1 to 100, C# is .1 harder than Java. If you can't handle that then I suggest Visual Basic may be a good choice for you.


First, I don't know where you got the "3 things" from. Second, I am not talking about whether a feature is "harder". I am talking about whether a feature encourages people to write non-obvious, hard-to-maintain code. This has nothing to do with whether a feature is hard to learn or not.


As far as the examples from the "C# FAQ", the person who wrote that did it as a worst case scenario. He "despises" Microsoft and all Microsoft products. He constantly posts on the C# newsgroups to brag about how wonderful Java is. He is a jerk.


If you run out of arguments, resort to name calling. And they made you a moderator. How ironic!


As far as operator overloading goes, sometimes it si useful. Java said who cares let's eliminate it. C# says let's leave it in and have people use it wisely. Sure you can use it unwisely.


It is used unwisely more often than not. Many programmers know how to use operator overloading wisely. Far too many don't. Unfortunately, when an individual programmer uses operator overloading unwisely, it is not just he/she that suffers. The rest of us who get to maintain his code suffer too. This is the reason it is better to use a language that doesn't support operator overloading at all. After all, there are only a few circumstances (such as numerical computing) where the use of operator overloading is justified.


But there are plenty of language features in Java that are poorly done that can cause code confusion. That is what separates programmers from hackers.


Any language feature can be misused. Java eliminated the features that bring more pain than gain. Operator overloading is only one example.


Parts of .Net and C# have been given to ECMA. There will be a C# port because it has nothing to do with Microsoft.


First, the language by itself is not very useful. You need the libraries. Second, the current version of C# has been given to ECMA, but the next version may not be. (COM/DCOM was given to the Active Group, but COM+ was not, remember?)
[ April 22, 2002: Message edited by: Apu Petilon ]
 
Apu Petilon
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Randall Twede:

glad someone finally thought about the poor slob who has to enhance or change code. i have never had to do that for any code but my own, but from this discussion i noticed right away what a nightmare it could be if i did have to and i didnt even know what an operator did.


Thank you for the kind words, Randall. Most programmers spend more time maintaining code written by other people than writing new code. More time will be spent reading and maintaining code than writing it in the first place. Because of this, code maintainability is more important than saving a few keystrokes when writing it initially. A lot of professional programmers ufortunately don't understand this. Hopefully I can convince a few people here.
 
She'll be back. I'm just gonna wait here. With this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!