ده مقال لاقيته موجود مقارنه بين ال c# vs java
[LEFT]Arguing “Which programming language is better?” is like debating “Which religion is better?” You will never find an answer because people have different needs, they judge with different criteria, and in the end, the debaters just end up getting pissed off at each other. That’s why you’ll frequently see developers label the programming language debate as a “religious war.”
For me in my current job, C# is my language of choice. But I’ve also worked with Java, PHP, C++, C, RGB II and even assembler. In general, I feel it’s better to select the right programming language for the job, rather than force the job to use my current favorite language.
That said, Java fan Brian M. Clapper has written an interesting article claiming that the Java language “depresses me lately. It’s being left in the dust by other languages. Worse, though, for Java enthusiasts: Java has fallen behind C#.”
According to Clapper, here are some features that C# now has that Java does not:
* Lambdas, which are way better than anonymous inner classes. (C# has anonymous inner classes, too.)
* Delegates. You can kind of do this in Java, but it’s not as clean.
* Operator overloading. This feature can be abused, but it is still occasionally useful, especially in libraries and DSLs.
* Properties. No need to write getters and setters. Everything looks like a direct field access, even if it isn’t.
* Yield co-routine capability. This is a powerful and highly useful capability, especially for lazy iterators.
* Extension methods. They permit you to “extend” existing classes.
* Null coalescing operator that provides a simple syntax for dereferencing a reference and supplying a default if the reference is null.
The responses to his article have been amusing:
“Dude thanks! Your article was the tipping point of me having to choose from Java or .NET. I am going with C# now.” Um, that’s all it took, one blog article?
“So what. This is not an arms race to fatten up the language with as many features as possible. Simplicity is a good thing.” So let me get this straight: If my product has more features than yours, I have a better product. But if my product has fewer features, then it’s more simple. Talk about rationalization!
Debating “Which programming language is better?” is like banging your head against a brick wall. I hope you brought some aspirin.
C# Is Now a Better Language Than Java[/LEFT]
ThinGs We Do DictatE OuR FuTuRe, AnD NoW We PaY FoR WhAt We Did IN ThE PaST