"JavaRanch, where the deer and the Certified play" - David O'Meara
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.
C# Essentials
by Ben Albahari, Peter Drayton, Brad Merrill
Rob
SCJP 1.4
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Originally posted by Cindy Glass:
The "Best Practices" from the first link are really eye opening!!
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
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:
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
For a balanced view click both links:
"I'm not back." - Bill Harding, Twister
Originally posted by Thomas Paul:
3) lack of operator overloading
4) lack of pass by reference
Originally posted by gautam shah:
i think no 3 and 4 is weakness of java not its better part....
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Originally posted by gautam shah:
i think no 3 and 4 is weakness of java not its better part....
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Originally posted by Thomas Paul:
Things that are better in C#:
1) foreach
4) automatic boxing of primitives
- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
Originally posted by Thomas Paul:
A statment like:
if (myShippingObject.equals(yourShippingObject))
is much clearer.
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.
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
The only reason for time is so that everything doesn't happen all at once.
- Buckaroo Banzai
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
The only reason for time is so that everything doesn't happen all at once.
- Buckaroo Banzai
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
"I'm not back." - Bill Harding, Twister
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
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
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.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.
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
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?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++.
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
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.
Originally posted by Thomas Paul:
And if operator overloading is such a problem, why does Gosling want to add it back to Java?
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?
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?
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
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.
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.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.
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
SCJP
Visit my download page
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 ]
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.
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.
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.
Get me the mayor's office! I need to tell him about this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|